performance icon indicating copy to clipboard operation
performance copied to clipboard

Image Placeholders not working

Open tibor opened this issue 10 months ago • 2 comments

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

tibor avatar Apr 21 '24 00:04 tibor

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.

westonruter avatar Apr 22 '24 17:04 westonruter

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.

adamsilverstein avatar Apr 23 '24 17:04 adamsilverstein