Hi,
This is not tehnically possible right now as we need to get the right size before the lazyload.
Would be curious why you want to not use our lazyload, is something that dont work right ?
Thanks!
Hi @optimole,
Thanks for the quick reply. Each website is different.
In our case, Perfmatters offers lazy loading features and filters that your plugin doesn’t. For example, it offers “fade-in” effects and several filters that allow us to disable lazy loading by page type (post, events, etc.).
As stated before, we’d like to scale our images using your plugin, but retain the lazy loading features of Perfmatters.
So, why can’t you separate image scaling from lazy loading? Using two (2) toggles (one for scaling images and one for lazy loading) should help many by offering a higher level of customization.
If the above is not possible, oh well, we tried. 🙁
Good Day,
Can you guys provide an update on this? Any workarounds? (e.g., disable lazy loading programatically via PHP code snippet, etc.).
This is critical for us since we like the way your plugin converts the images (without lazy loading).
Thank you!
Plugin Support
Kush
(@kushnamdev)
Hi @generosus,
Unfortunately, it is currently not possible to scale images without using the Optimole lazy loading mechanism as it is dependent on lazy loading.
Best regards
Thank you, Kush. As an alternative, can you guys develop/provide a filter (e.g., php code snippet) that would allow us to exclude certain images from lazy loading? Again, thank you.
Update:
(1) We found this filter (shown below) to disable an image from lazy loading. How can we modify it to exclude several images?
add_filter('optml_dont_replace_url', function( $old, $url ) {
if ( $url === 'https://example.com/wp-content/uploads/2018/09/1.jpg' ) {
return true;
}
return $old;
}, 10, 2);
(2) We also found this filter (shown below) to disable lazy loading of PNG images. Can you guys kindly provde one to disable JPEG images?
define("OPTML_DISABLE_PNG_LAZYLOAD",true);
Thank you!
Hello @generosus,
You can use the built-in exclude mechanism in order to exclude images from optimizing/lazy-loading, using several conditions, without needing to add any filter, as you can see here: https://docs.optimole.com/article/1191-exclude-from-optimizing-or-lazy-loading
If you encounter any issue, don’t hesitate to open another support topic.
Best regards,
Irinel
Hey Irinel,
Your answer does not address our questions. Can you kindly revisit them?
Thank you!
Hello @generosus,
I’m sorry about not answering the questions.
Currently, we do not offer other filters than the ones present in the Optimole documentation, and that’s why I redirected you to the built-in feature.
I hope this helps,
Irinel
Hey @irinelenache,
Can you kindly approach your developers to see if they can answer the questions?
The first question simply requires telling us how we can use your filter for several images at a time (standard PHP coding).
The second question, simply requires including jpg/jpeg images in your code (adding the image format to the code).
Without updating your plugin or documentation, providing the requested info via reply would be good enough for us.
Thank you!