SaaS CMS has officially launched! Learn more now.

The image cannot be displayed because it contains errors

Ayo
Ayo
Vote:
 

When I upload an image to Episerver media via the back office.

For some reason when I then go to the URL for the image I see this error:

The image [URL] cannot be displayed because it contains errors.

However when I go to the App_Data > Blobs > and navigate to one of the images I have uploaded when I load the image in to the browser it works with no issues.


I have no idea, why or how to fix it. Has anyone come across this kind of thing before? any ideas about how I can debug this issue?

#190318
Edited, Apr 09, 2018 12:14
Vote:
 

Have you made sure you go to the image after uploading it and publishing it. Like all IContent it will need to be published before it will display on the site but the blob folder/files will have been created.

#190319
Apr 09, 2018 12:45
Vote:
 

There could be any number of reasons for this error. In the first instance I'd suggest using something like fiddler to view the request between your browser and the server and check to see that the "Content-Type" header is correct for the type of image you're viewing and that the raw response looks correct.

Is this an issue that occurs for all images of all types or is it specific to a single image or a specific type of image (e.g. jpg)? Are other types of file working correctly (e.g. PDFs or Text files)?

As a bit of a long shot, do you have the Episerver license warning showing on your site as I have seen images fail on sites with the warning showing due to the warning being injected into the response of the image?

Finally, just to clarify Scott's comment on publishing images - Assets are IContent and do need to be published however, unless you've disabled it in some way (such as by adding required field validation onto your asset properties), assets should publish automatically. You'd also still have access, published or not, assuming you're viewing the asset in the same session where you're logged in to the CMS. Certainly worth a check though.

#190401
Apr 10, 2018 14:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.