Loading...
Generate optimized HTML5 and Next.js responsive image srcset and sizes attributes to boost LCP and save mobile bandwidth
Select responsive image presentation templates
Configure base asset path, widths, and viewport slots
<img src="/images/hero-banner.jpg" srcset=" /images/hero-banner-480w.jpg 480w, /images/hero-banner-768w.jpg 768w, /images/hero-banner-1024w.jpg 1024w, /images/hero-banner-1440w.jpg 1440w, /images/hero-banner-1920w.jpg 1920w, /images/hero-banner-2560w.jpg 2560w " sizes="(max-width: 768px) 100vw, (max-width: 1200px) 100vw, 100vw" alt="Modern web application dashboard preview banner" loading="lazy" decoding="async" style="aspect-ratio: 16/9; width: 100%; height: auto;" />
// Next.js Image component with calibrated sizes attribute
import Image from 'next/image';
<Image
src="/images/hero-banner.jpg"
alt="Modern web application dashboard preview banner"
width={2560}
height={1440}
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 100vw, 100vw"
loading="lazy"
/><picture>
<source
type="image/webp"
srcset="/images/hero-banner-480w.webp 480w,
/images/hero-banner-768w.webp 768w,
/images/hero-banner-1024w.webp 1024w,
/images/hero-banner-1440w.webp 1440w,
/images/hero-banner-1920w.webp 1920w,
/images/hero-banner-2560w.webp 2560w"
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 100vw, 100vw"
/>
<img
src="/images/hero-banner.jpg"
srcset="/images/hero-banner-480w.jpg 480w,
/images/hero-banner-768w.jpg 768w,
/images/hero-banner-1024w.jpg 1024w,
/images/hero-banner-1440w.jpg 1440w,
/images/hero-banner-1920w.jpg 1920w,
/images/hero-banner-2560w.jpg 2560w"
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 100vw, 100vw"
alt="Modern web application dashboard preview banner"
loading="lazy"
decoding="async"
/>
</picture>