Hello @aluknot,
1) You can try to switch the optimization level to auto, it should increase a bit the quality of the image. Make sure after you do this, to regenerate Elementor CSS, like going to Elementor -> Tools -> Regenerate CSS
2) Similar thing with 1, as Elementor caches the dynamic CSS into separate CSS files, you will need to regenerate it once that you turn Optimole off. More details about how Optimole works with Elementor you can find here -> https://elementor.com/blog/optimole/
Hello @themeisle, thanks… that work 🙂 Now I have another question. I see in the FAQ that you can disable optimization for a certain image with this:
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);
My question is… is there a way to set the general optimization level to “medium” but set “auto” or something else to certain image? Thats would be a cool function, because “medium” is fine for me on general image, except this one.
Thanks in advanced.
-
This reply was modified 7 years, 1 month ago by
aluknot.
-
This reply was modified 7 years, 1 month ago by
aluknot.
Hello @aluknot,
We don’t have something like this right now but I will try to add it in the next release.
Please keep an eye over the changelog for this change.
Thanks a lot for your feedback.
Cool @optimole, good to know that. Thanks for this awesome plugin.
Just one more thing… I am having an issue with the QR code generated by this plugin. The QR code is blurred by the Optimole lazy loading function, as you can see here (at the end of the page). Surely because it is not an image in jpg or png format but it is a php.
Here is the image code:
<img data-opt-src="https://piclu.shop/libros/wp-content/plugins/cryptocurrency-donation-box/includes/generate-qr-code.php" src="https://piclu.shop/libros/wp-content/plugins/cryptocurrency-donation-box/includes/generate-qr-code.php" alt="Scan to Donate Bitcoin to 3CRMB6qM1DvLswN6nxKjppX6W5ycjXpeZp" class="optml_lazyload_img">
I tried using the filter optml_dont_replace_url with the url https://piclu.shop/libros/wp-content/plugins/cryptocurrency-donation-box/includes/generate-qr-code.php but didn’t work.
Any workaround? Thanks.
-
This reply was modified 7 years, 1 month ago by
aluknot.
-
This reply was modified 7 years, 1 month ago by
aluknot.
Hello @aluknot,
Indeed it seems we have a bug in this particular case which I have managed to tackle and I will release it in the next update.
Meanwhile, for a quick fix, you can use this:
add_filter( 'optml_ignore_image_link', function ( $old, $url ) {
return ( strpos( $url, 'generate-qr-code.php' ) !== false );
}, 10, 2 );
-
This reply was modified 7 years, 1 month ago by
Optimole.