About this plugin
com. g. full size vs thumbnail in a gallery), and so it is easier to see which images in a page are related to each other.
com by defining MISSING_UPLOADED_IMAGE_PLACEHOLDER_BUILTIN to be placekitten_color or placekitten_grayscale, or supplying those same values via the missing_uploaded_image_placeholder_builtin filter).
This plugin is for use during development only. g. on Vagrant or XAMPP), or on your staging server.
This plugin is especially useful when working on a team where you share around a database dump but not the uploaded images (which should always be omitted from the code repository), so if you give a database dump to another developer but don’t include the uploaded images, with this plugin enabled they will see a placeholder where the uploaded image appears. This plugin is an alternative approach to what is offered by the Uploads by Proxy plugin.
If you have applied the production database to another environment which lacks the uploaded files, but you know that all images referenced in the database do exist on production, you can define the MISSING_UPLOADED_IMAGE_REDIRECT_SERVER constant or filter missing_uploaded_image_redirect_server to short-circuit the placeholder service and redirect the image request to that server.
php. See #19235. Similarly, make sure that missing uploaded files get served by the WordPress 404 handler, not Apache/Nginx.
conf (or remove it altogether):
# Handle all static assets by serving the file directly. Add directives # to send expires headers and turn off 404 error logging. (js|css|png|jpg|jpeg|gif|ico)$ { expires 24h; log_not_found off; }
You can add support for your own favorite placeholder services by filtering missing_uploaded_image_placeholder.
php or drop it into a mu-plugin:
com/%d/%d/%s', $args['width'], $args['height'], $tags ); return $url; } add_filter( 'missing_uploaded_image_placeholder', 'my_filter_missing_uploaded_image_placeholder', 10, 2 );
Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.