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

Feature Request: Resize only images with a certain class #23

Closed
meneer-code opened this issue Sep 22, 2022 · 2 comments
Closed

Feature Request: Resize only images with a certain class #23

meneer-code opened this issue Sep 22, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@meneer-code
Copy link

Hey @Mecanik

I'm keen to do another pull request if you can point me in the right direction.

I'd like to take a leaner approach for websites that have a LOT of images, and only resize the LCP element of each page, indicated by perhaps a class or data-attribute.

What do you think of this idea? Is it worth exploring or is it better to just hardcode the image URL in my template/function files?

Attached is an example of a LCP element prefetch in wp_head:
Screenshot 2022-09-22 at 09 33 56

@Mecanik
Copy link
Owner

Mecanik commented Jan 15, 2023

Not a bad idea, I will consider it. If it doesn't impact performance I will add a feature for this.

@Mecanik Mecanik added the enhancement New feature or request label Jan 15, 2023
@Mecanik
Copy link
Owner

Mecanik commented Jan 31, 2023

Hello, I am closing this issue since I have finally finished the Cloudflare Worker alternative. It's much more advanced and does not have this issue.

Please read my article on how to use and get the code: https://mecanik.dev/en/posts/cloudflare-image-resizing-for-wordpress/

@Mecanik Mecanik closed this as completed Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants