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 fetchpriority to SvelteImg.svelte #44

Closed
wants to merge 2 commits into from

Conversation

leoj3n
Copy link
Contributor

@leoj3n leoj3n commented Mar 6, 2024

Closes #42

@zerodevx
Copy link
Owner

zerodevx commented Mar 6, 2024

Hmm not sure if this is needed it's already supported: #42 (comment)

Edit: unless the intention is to set a default fetchpriority other than auto?

@leoj3n
Copy link
Contributor Author

leoj3n commented Mar 7, 2024

I'll just say as a consumer of the APIs provided to us by the browser gods, I have seen a lot of benefit manually specifying fetchpriority. When compared to decoding which is already implemented, I have never seen decoding make a noticeable difference in scores or objectively. I have opened another issue questioning the wisdom of always setting a value for performance toggles. I would think of this more of a hint to unfamiliar users that it is something that exists which they may wish to leverage. Alternatively the library could offer a default set of optimization settings for "above-the-fold" and "below-the-fold" images. However, I feel this obscures knowledge the user should have about how this all works. I think I would keep it basic and fill the gaps with documentation about what setting you probably want for X type of image.

@zerodevx
Copy link
Owner

As discussed in #42, gonna close this in favour of documenting in readme, or via a @typedef.

Thanks so much for bringing this up! 🙏

@zerodevx zerodevx closed this Mar 11, 2024
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.

feat: fetchpriority
2 participants