#Images not displaying in frontend but available in backoffice

1 messages · Page 1 of 1 (latest)

lusty furnace
#

We've got a problem that the images are not displaying in the frontend but are available in the backoffice so the file is there and you can view it. In the console there is the following error.
An unhandled exception has occurred while executing the request.
SixLabors.ImageSharp.UnknownImageFormatException: Image cannot be loaded. Available decoders:

  • TIFF : TiffDecoder
  • BMP : BmpDecoder
  • TGA : TgaDecoder
  • QOI : QoiDecoder
  • GIF : GifDecoder
  • PBM : PbmDecoder
  • Webp : WebpDecoder
  • JPEG : JpegDecoder
  • PNG : PngDecoder

I think it has something todo with the cache because we usynced these images from staging to localhost

spark cosmos
#

uSync will sync all the references in the media library from one instance of Umbraco to another, but doesn't copy the physical files. I assume you have validated that the files exist in the media folder (or cloud storage)?

lusty furnace
#

@spark cosmos the file preview works in the backoffice so i think the physical files should also be there. but i'll have a look. How do u sync the physical files?

spark cosmos
#

Copy/paste 😦

long viper
#

Is your image of one of the listed formats that ImageSharp supports?

spark cosmos
#

You can also clear the various Umbraco caches from Settings, if you really think that is the issue

lusty furnace
#

@long viper it is a jpg could this be a problem because its no jpeg?

spark cosmos
#

No. image/jpeg handles either jpg or jpeg files

lusty furnace
#

hmmm i dont get it then

#

as you can see the image is available here

spark cosmos
#

Have you tried outputting the url that ImageSharp thinks the image is supposed to be coming from? Then loading that url directly in the browser?

#

Certainly looks like the image is there 😄

lusty furnace
#

hmm the image cropurl is null there ill have a look into it where the problem is and'll tell you

long viper
#

Must be something weird in the encoding of the file. ImageSharp reads headers from the file to determine the format, and something in there must be "wrong", but not wrong enough for the browser to fail showing the image. Try re-saving it from an image editor, and see if that helps.

spark cosmos
#

@lusty furnace Did you get this sorted?

lusty furnace
#

@spark cosmos I didn't quite get it. It seems to be a caching problem, since deleting the local cache folders worked. But refreshing it over umbraco itself didnt. Its really weird, maybee i did something wrong. But i'll have an eye on it in the future. if i figure something out i'll let you know!