I have a Slider block view on a single CPT template.
We use a plugin to watermark all uploaded images.
Sometimes I have noticed that while the images in admin contain the watermark, the one displayed on the slider don't.
hidden link
hidden link
What can be the problem?
It seems that the plugin does not apply the watermark to all images, because none of these images in the slider have a watermark:
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
However, this one does:
hidden link
I'm not sure why some would have a watermark but others do not, but it probably has to do with how the watermark plugin works, and when it applies the watermark. What can you tell me about this post - were the images uploaded in wp-admin when creating this post, was this post created from the front-end of the site using Forms, or was some import process involved? Were all the images uploaded at the same time, or were some images uploaded at different times? Is the problem the same in all posts, or just this one?
I did also some research and it seems it could be related with the suffix "-scaled", applied by WordPress to big images.
The slider is dynamic filled with images from a custom field.
I have checked these images, and they are "-scaled" and watermarked, but the slider use the original uploaded pictures.
How can I force the slider to use the scaled versions?
Unfortunately there is no feature available to select a different scaled version of the original custom field value. The slider block pulls image URLs directly from the custom field values, and there is no option available for choosing a different resized image. I suspect you could modify the custom field values to use the -scaled image URLs, or you could implement a custom code solution that copies the original values of the custom field and clones them into a separate custom field with the -scaled URL instead of the original image URL.
I have decided to simply disable the complete WordPress scaling feature:
add_filter( 'big_image_size_threshold', '__return_false' );
I have anyway Shortpixel installed to compress/resize uploaded images 😉
Thanks.