maxdome
Chevereto Member
Near enough every website suffers missing images.
They either show as blank sections within posts or they show in access logs as 404 errors, usually both.
Sometimes they are caused by bad backlinks and other times by accidental image or directory deletion.
The good news is you can use the existing .htaccess from Chevereto to replace missing images.
The Solution To Missing Image Files
Enable this snippet into your .htaccess file to load a replacement image whenever an image file cannot be found:
Remove the #
Now disable this snippet with a #:
That's it!
e.g: My 404 Image error demo:
If you liked my tip, click the "like" button
Cheers!
They either show as blank sections within posts or they show in access logs as 404 errors, usually both.
Sometimes they are caused by bad backlinks and other times by accidental image or directory deletion.
The good news is you can use the existing .htaccess from Chevereto to replace missing images.
The Solution To Missing Image Files
Enable this snippet into your .htaccess file to load a replacement image whenever an image file cannot be found:
Remove the #
You can put the replacement file wherever you want but always tell Apache where it is relative to the .htaccess file that this snippet is in.RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/default/404.gif [NC,L]
Now disable this snippet with a #:
#RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
That's it!
e.g: My 404 Image error demo:
If you liked my tip, click the "like" button
Cheers!
Last edited: