-
Notifications
You must be signed in to change notification settings - Fork 0
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
Better image optimizations #33
Comments
I've added it for the background images as these were completely unoptimized and were responsbile for almost all our bandwidth usage |
How can we optimize backgrounds for different screen sizes? Perhaps we can build a component similar to |
Maybe we could also include blurred placeholders? Something like this offers: https://unpic.pics/placeholder/ |
This includes a refactor to astro for the component.
This includes a refactor to astro for the component.
This includes a refactor to astro for the component.
See also https://github.com/johannschopplich/unlazy for generating thumb hash for example |
We'll also have to make sure we set |
This includes a refactor to astro for the component.
This includes a refactor to astro for the component.
What is the exact goal of this issue? When is it done? |
There sadly is no integration with tailwind for this. But we use the This get's hairier when we use the |
I propose as goals
One rough estimate is the light house test in Google Chrome. If it does not complain about any image issues anymore we should be on the right track. Make sure to test both Mobile & Desktop! |
Because of the h-52 w-52 clases on the Image component we know the image will always be 13rem wide. We now use this information in the sizes attribute and optmize the images accordingly.
The authors of css tricks recommend not doing any If I think if we can somehow manage to automate the creation of the |
* feat(app): #38 update posts from instagram API This might break at any time if instagram changes the query_id. But the alternative is setting up an OAuth app which I couldn't get to work and might not be worth the hassle (at the moment). Closes: #38 * test(website): #38 use hard coded insta posts in tests * perf(website): #33 Correct Image optimizations for Instagram posts Because of the h-52 w-52 clases on the Image component we know the image will always be 13rem wide. We now use this information in the sizes attribute and optmize the images accordingly. * refactor(website): #38 Make count of insta posts easy to change Just added a count argument to the getRecentPhotos function.
Currently most images use a single image size and waste a lot of bandwith to download 4k images for them to then be displayed in a 400x400 px element.
We can use the
<Image widths={[ ... ]} />
attribute to generate the widths the element is displayed as.The text was updated successfully, but these errors were encountered: