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

sizes not loading correctly #63

Open
nikse opened this issue Jul 27, 2020 · 0 comments
Open

sizes not loading correctly #63

nikse opened this issue Jul 27, 2020 · 0 comments

Comments

@nikse
Copy link

nikse commented Jul 27, 2020

Hello, I noticed that the sizes string in the Image component does not actually incorporate the sizes that are in the config and the default sizing doesn't really correlate to the sizes. The sizes attribute of a source should tell the browser when to load each image size and as is it does not. The MDN docs do a good job of explaining what the sizes attribute should be doing

https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

Also, just wanna say I think this and you svelte waypoint components are great! I actually have a fork of each w/ some interesting (at least I think) upgrades

Here is my heavily modified svelte-image fork that allows passing options from the component level, noscript tags for ssr, lazy disabling, width/height replacement plus a few other things. Check it out, I'm happy to help move any of it into your code if you like https://github.com/nikse/svelte-image/tree/noscript-attribute-overrides-picture-fixes

Also modified svelte-waypoint to fit my needs and add an option to declare the offset via vh && a fix for the destroy callback within your use funcitonality there matyunya/svelte-waypoint@master...nikse:master

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

No branches or pull requests

1 participant