PNG file not showing

I have several png files in my asp.net 3.5 web application. images displayed correctly in dev; however, when I upload the application to the server, png files are not displayed. I am using w2k8 and iis. when I server another image file from the same directory (jpg), it works. is there something i can't see in png files?

+4
source share
2 answers

This sounds like a permission issue. Have you checked the permissions on one of the PNG files to be sure that they can be read by EVERYONE?

If you can directly access the server, can you see the images if you use a browser on the server and visit a local site? http: // localhost /

Can you try viewing the PNG directly at the URL from your browser? By this, I mean entering the full URL to PNG itself, not a page showing PNG. For example http://sstatic.net/so/img/logo.png

+2
source

Very late, but perhaps not the wrong solution: If you rename .jpg to .png, it will not display in Microsoft browsers. If you save the file again in Paint, for example, it will change the mime type or file headers, after which it will be downloaded after this change.

You can easily check this:

  • Rename the .jpg file to .png
  • Download page: image is broken.
  • Save the file as .png now
  • Download page: image will load now
0
source

Source: https://habr.com/ru/post/1301798/


All Articles