performance
performance copied to clipboard
Image Placeholders not working
Bug Description
I tried to use the Image Placeholders plugin for my website with custom theme, but it wouldn’t change anything in the frontend. Do I need to add anything to my code as well?
Additional Context
- PHP Version: 8.1
- OS: macOS
- Browser: Chrome
- Plugin Version: 1.1.0
- Device: MacBook Air
According to the readme:
This plugin determines and stores the dominant color for newly uploaded images in the media library within WordPress and then uses it to create a placeholder background of that color in the frontend, visible until the image is loaded.
So it only works for newly-uploaded images. Did you try uploading a new image to see if the placeholder background color is present?
Ideally preexisting images already uploaded to the media library would have their dominant color computed, such as via a WP Cron process. This is not implemented, however.
Ideally preexisting images already uploaded to the media library would have their dominant color computed, such as via a WP Cron process. This is not implemented, however.
Regenerating images using wp-cli or a plugin should get the code to generate the placeholder images.