How to get the best image performance (Updated 2021)

1️⃣ Use `width` and `height` to prevent layout shift
2️⃣ Lazy-load images as they enter the viewport
3️⃣ Use modern image formats (WebP, AVIF)
4️⃣ Serve correctly sized images using `srcset`
5️⃣ Provide blur-up placeholders

1️⃣ Use `width` and `height` to prevent layout shift

These image attributes tell the browser how much space to allocate for an image, preventing the page from jumping when it loads. This avoids Cumulative Layout Shift (CLS).

https://t.co/KUyqGsxOoN
2️⃣ Lazy-load images as they enter the viewport

The browser shouldn't load images a user can't see. To prevent page speed from being penalized, we should load images as they're scrolled into the viewport.

https://t.co/rpjyg0YXsU
3️⃣ Use modern image formats (WebP, AVIF)

These new formats reduce image file size while retaining quality. WebP is supported by all modern browsers. AVIF should be soon, too.

https://t.co/TiNwEwGQNc
4️⃣ Serve correctly sized images using `srcset`

The browser should choose the best image for the device. By providing multiple options, we avoid shipping large images to smaller viewports.

https://t.co/7FaQ8s72sp
5️⃣ Provide blur-up placeholders

Improve the user experience of loading large images by showing a blurred placeholder while loading. This prevents an extra network request to fetch a thumbnail image, too.

This also improves Largest Contentful Paint.

https://t.co/g3NDzUH1ue
The first four optimizations above are handled automatically with `next/image`. Blur-up placeholders coming soon.

https://t.co/BCfEj1mKeI
Some other frameworks/providers with optimized images:

• @eleven_ty: https://t.co/0X5OPDU1Fk
• @gatsbyjs: https://t.co/YRfCxRDvZ5
• @sanity_io: https://t.co/un7ZpdbZai
• @datocms : https://t.co/tx2qy4Kbub

Let me know others I'm missing!
If you found this helpful, you might also enjoy optimizing your web fonts.

https://t.co/TNAXslHQjd

More from For later read

@snip96581187 @Daoyu15 @lab_leak @walkaboutrick @ydeigin @Ayjchan @franciscodeasis @TheSeeker268 @angie_rasmussen Clearly, because as I have been saying for 8 months now, DTRA and DARPA have been using Ecohealth and UC Davis to collect novel pathogens for gain of function work back in the USA. I have documented this in many threads which I will post here just to annoy everyone.

@Daoyu15 @lab_leak @walkaboutrick @ydeigin @Ayjchan @franciscodeasis @TheSeeker268 @angie_rasmussen


@Daoyu15 @lab_leak @walkaboutrick @ydeigin @Ayjchan @franciscodeasis @TheSeeker268 @angie_rasmussen


@Daoyu15 @lab_leak @walkaboutrick @ydeigin @Ayjchan @franciscodeasis @TheSeeker268 @angie_rasmussen


@Daoyu15 @lab_leak @walkaboutrick @ydeigin @Ayjchan @franciscodeasis @TheSeeker268 @angie_rasmussen
Part of what is going on here is that large sectors of evangelicalism are poorly equipped to help people deal with basic struggles, let alone the ubiquitous pornography addictions that most of their men have been enslaved to for years.


On the one hand, there's a high standard of holiness. On the other hand, there's a model of growth that is basically "Try Harder to Mean it More." Identify the relevant scriptural truth & believe it with all of your sincerity so that you may access the Holy Spirit's help to obey.

Helping sincere believers believe and obey the Bible facts is pretty much all the Holy Spirit does these days, other than convict us of our sins in light of the Bible facts.

If you know you are sincere and hate your sin and believe the right Bible facts as hard as you can but continue to be enslaved to your pornography addiction, what else left for you to do? Just Really, Just Really, Just Really Trust God and Give it to Him?

To suggest that there are other strategies available sounds to those formed in this model of growth like one is also suggesting that the Bible is insufficient, but it also suggests something just as threatening- that there are aspects of reality that are not immediately apparent.

You May Also Like