Search code examples
htmlimagepngsrc

PNG images not loaded


I am the developer of www.zundelcristea.com website.

For some reason, png images are not being loaded, although they do exist on the right path, with the right permissions (664, as any other file on the server).

My .htaccess doesn't contain anything related to images, nor their folders. I have no idea what else I can check.

Locally, .png are loaded normally. Any suggestion is much appreciated

[EDIT] Nothing in error_log


Solution

  • You transferred them in text mode:

    $ pngcheck -v mobile-menu-icon.png
      File: mobile-menu-icon.png (425 bytes)
      File is CORRUPTED. It seems to have suffered DOS->Unix conversion.
      ERRORS DETECTED in mobile-menu-icon.png
    

    The first eight bytes of a PNG file always contain the following values:

    (decimal)              137  80  78  71  13  10  26  10
    (hexadecimal)           89  50  4e  47  0d  0a  1a  0a
    (ASCII C notation)    \211   P   N   G  \r  \n \032 \n
    

    From the PNG specification, "rationale": This signature both identifies the file as a PNG file and provides for immediate detection of common file-transfer problems. The first two bytes distinguish PNG files on systems that expect the first two bytes to identify the file type uniquely. The first byte is chosen as a non-ASCII value to reduce the probability that a text file may be misrecognized as a PNG file; also, it catches bad file transfers that clear bit 7. Bytes two through four name the format. The CR-LF sequence catches bad file transfers that alter newline sequences. The control-Z character stops file display under MS-DOS. The final line feed checks for the inverse of the CR-LF translation problem.

    See http://www.libpng.org/pub/png/spec/1.2/