Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter to img out end-result #1

Open
wants to merge 1 commit into
base: patch-1
Choose a base branch
from

Conversation

feastdesignco
Copy link
Owner

Rather than having to create a separate file in a theme, add a filter to the base output so that it can be overridden in a plugin as well as a theme.

Usage example: str_replace src with data-lazy-src, then add WPRocket's lazyload src: src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs="

https://docs.wp-rocket.me/article/130-manually-apply-lazyload-to-an-image

Possibly even better: add separate filters for each part of the output - li, a, img

Rather than having to create a separate file in a theme, add a filter to the base output so that it can be overridden in a plugin as well as a theme.

Usage example: str_replace src with data-lazy-src, then add WPRocket's lazyload src: src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" 

https://docs.wp-rocket.me/article/130-manually-apply-lazyload-to-an-image

Possibly even better: add separate filters for each part of the output - li, a, img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant