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

Show same image with different resolution at smaller screen widths #1560

Open
SamuelmdLow opened this issue Nov 7, 2024 · 2 comments
Open
Assignees

Comments

@SamuelmdLow
Copy link
Member

SamuelmdLow commented Nov 7, 2024

With smaller screen size you benefit less from high resolution. You often also have slower machines (phone instead of laptop). We can improve site performance using css media queries by hiding large resolution images when the screen width is small and showing the same image with lower resolution

@SamuelmdLow
Copy link
Member Author

Actually what I said was wrong. Use this https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images (thanks peter!)

@Nishim12
Copy link
Contributor

We can combine this with image renditions so that we can get multiple sizes of images then we can use the srcset and sizes tags to improve performance maybe. Here is the documentation for creating multiple image renditions https://docs.wagtail.org/en/latest/advanced_topics/images/renditions.html

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

When branches are created from issues, their pull requests are automatically linked.

2 participants