You need to sign in to do that
Don't have an account?

Image Not Loading
Hello,
I have a VF page that I created on a custom object. In that page, I am loading an image within a table. The image is saved as a GIF file in my Documents object in SFDC. Everything worked as it should in the past but I recently made a change to the image that is supposed to show and the code is still showing the prior image. Does anyone know why this would be happening as the old image is not even in the Documents object anymore? The line of code I am using is below. Thanks,
<img src="/servlet/servlet.FileDownload?file=01570000001M9Vp" alt="Essential" title="Essential"/>
It is using cached image, I'm guessing.
All Answers
It is using cached image, I'm guessing.
I cleared my cache and it is now showing the proper image. Odd that it would do that given that there is a link. Do you know if there is anyway around it or do I just need to cleat my cache if I make future changes?
Do you have cache="true" in the apex:page tag? If you do, you could specify it to false.
No, I don't have anything which is supposed to mean it defaults to false, according to the component reference.
I'm not quite sure but I suggest trying the apex:image tag instead of the HTML img tag. I have never had problems with the apex:image tag.
If you just want to load the image (http://www.rasteredge.com/how-to/csharp-imaging/load-from-file/) ,you can refer to this code:
namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string fileName = "c:/Sample.png";
REImage reImage = REFile.OpenImageFile(fileName);
REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
It is from an image tool in Google.Hope to help you.