WP Rocket
Forum Replies Created
-
Glad to hear that! I’ll mark this one as resolved then. 🙂
- This reply was modified 5 months, 2 weeks ago by WP Rocket.
Hi there. It looks like these images will need to be excluded so they can load properly; this snippet on my test site seems to do the trick:
add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_poly_flags' );
function rocket_lazyload_exclude_poly_flags( $attributes ) {
$attributes[] = 'alt="English"';
$attributes[] = 'alt="Italiano"';
$attributes[] = 'alt="Español"';
$attributes[] = 'alt="Français"';
return $attributes;
}So you could try the same thing (after adapting the code to the languages being used on your own site, of course).
Let us know how it goes!Forum: Plugins
In reply to: [LazyLoad Plugin – Lazy Load Images, Videos, and Iframes] Webp images removedHi Butkis and Sven,
Jurica from WP Rocket here, and I’ll be very glad to assist you with this!
I’ve tried to reproduce the issue on my test site, but I want’ able to reproduce it:

Could you check the browser console if there are any errors? Or if you have test/staging site, try disabling other plugins to see if it that will help. If disabling other plugins helps, it would indicate an issue with another plugin.
Best Regards.
Hi Reynir,
I hope you are well!The Enable Lazyload option should not generate Mixed content, possibly the error is related to a second layer cache or some other configuration.
I can’t review the code you shared because it’s restricted/blocked for my area.
However, I suggest you start by reviewing the most basic configuration of your website. You can read some recommendations in the following article: https://docs.wp-rocket.me/article/314-using-ssl-with-wp-rocket
In case you are on an Apache/LiteSpeed server you can also force HTTPS via htaccess.
You would only have to add the following code at the beginning of the file:Header always set Content-Security-Policy "upgrade-insecure-requests;"
If you have doubts about how to add it, I suggest you ask your server provider for help.
I hope my answer solves your doubts, and you can solve the mixed content issue.Hi @clickrmedia
I am sorry for the troubles you are having with this.
Could you please share a URL where we can reproduce this issue? We would like to check, in case we can see something that might give us a clue about what’s going on here.
Best regards.
Hi @thebarebutlers!
I couldn’t replicate the issue on my end.
If you are still experiencing the issue, you will need to disable LazyLoad on the affected pages.
We don’t have a UI for that, but you can do it programmatically by using the following filter:
add_filter( 'do_rocket_lazyload', function() { if ( is_page(99) ) { return false; } return true; } );Change the
99by the page ID you want to target.Kind regards,
Adame
Hi !
Thank you very much for your reply. I hope you’re having a good day.
We’ve tested this matter and couldn’t reproduce it. Please see below:
Full-size image → https://jmp.sh/0x6OaM0Could you please share more info:
1. If there’s a set of steps to be able to reproduce the issue please list them allThank you for your time and patience on this matter. I’ll be waiting for your reply. I hope you have a great day!
Regards,
JorgeHi Pashtun,
Yes, at first I believed there were several ways of doing this, but upon re-reading your message I realized my mistake and I badly edited the message.
Best Regards
Hi @johnthedocs!
Jorge from WP Rocket here.
You could use any of the following helper plugins depending on your needs:
- Exclude specific src files:
https://github.com/wp-media/wp-rocket-helpers/tree/master/lazyload/wp-rocket-lazyload-disable-src - Exclude specific classes:
https://github.com/wp-media/wp-rocket-helpers/tree/master/lazyload/wp-rocket-lazyload-disable-class
Should you have any more questions or concerns please let me know and I’ll be more than happy to help you. Thank you for your time and patience. I hope you have a great day.
Regards,
- This reply was modified 4 years, 8 months ago by WP Rocket.
Hi, Pashtun!
Jurica from WP Rocket here.
To exclude the image you can try the following:
– You can also use the filters
rocket_lazyload_excluded_attributesorrocket_lazyload_excluded_srcto exclude specific patterns.Best Regards
Hi @johnthedocs,
Jurica from WP Rocket here. Thank you for contacting WP Rocket’s support.
`You have several options to exclude images from being lazyloaded:
– You can simply add a
data-no-lazy="1"property in your img or iframe tag.– You can also use the filters
rocket_lazyload_excluded_attributesorrocket_lazyload_excluded_srcto exclude specific patterns.– For iframes, the filter is
rocket_lazyload_iframe_excluded_patternsYou can read how to preload an image in this article: Preload Largest Contentful Paint image.
I hope this information helps!
Best Regards,
Hi, Pashtun!
Jorge from WP Rocket here. Apologies for the delay in our reply. We are dealing with a higher volume of support requests than usual. Thank you for your patience.
The problem is that the image is not present when the script to create the effect is fired. The script in charge of the effect is this one:
- /wp-content/themes/hestia-pro/assets/js/parallax.min.js
After reviewing the script, there’s a function that’s listening to the
onWindowResizeevent which is why whenever you change the size of the window it works. The only option would be to exclude that image.Should you have any more questions or concerns please let me know and I’ll be more than happy to help you. Thank you for your time and patience. I hope you have a great day.
Regards,
Hi @delaspuke.
You can use the following code snippet:
add_filter( 'rocket_lazyload_youtube_html', 'add_gdpr_note'); function add_gdpr_note( $youtube_lazyload ) { $youtube_lazyload .= '<div class="lyte_gdpr">The video is embedded by Youtube. The privacy policy of Google applies.<hr /></div>'; return $youtube_lazyload; }You can change the lyte_gdpre class to one that will be used to style the GDPR note.
Regards,
Vasilis
Hi there!
Thank you very much for your reply.
We’re sorry to know we were not able to satisfy your current necessities and hope we can work this out in the future.
Thanks for the patience. Have a wonderful day.
Regards,
Jorge