Recently I was contacted by a user that on his website his uploaded images cannot be seen. According to the user, this must of course be an issue on the server... (arrgh!)
When I manually loaded the picture, I was a little bit surprised by the error message shown by Firefox:
The image "http://example.com/logo.png" cannot be displayed because it contains errors.
By testing the same URL on Chrome, the "classical" image not found/image broken image appeared:
To proof that its not a server issue, I uploaded a png picture myself and opened the URL. Which worked fine, of course.
By using the "Page Info" on Firefox, additional information was shown about the images. First the working one, uploaded by me:
And then the non-working image:
Very interesting here are the mentioned dimensions. So there's definitely something wrong.
I told the user that there must have been either a FTP transfer error or that the pictures were not properly created. At the end it turned out, that the user transferred the images in ASCII mode instead of BINARY mode...
Yeah yeah, it's always the server to blame... ;-)
Ramesh from wrote on Jul 5th, 2023:
Perfect. Thank you for this post. I tries with different images with no luck initially. Because, I transferred everything with the same way (wget from GitHub). I didn't think of this.
ympek from wrote on Apr 22nd, 2021:
Wow. Just wow. Thank you. :)
jim from wrote on Jul 7th, 2017:
Thanks! Wasted a few hours before reading your article.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder