Responsive images (srcset)
Në shqip: Imazhet që përshtaten
ShpjegimiSQ
Me srcset i jep shfletuesit disa madhësi të së njëjtës foto, dhe ai zgjedh më të përshtatshmen për ekranin — telefoni s'shkarkon foton gjigante të desktopit.
EnglishEN
With srcset you give the browser several sizes of the same photo, and it picks the best one for the screen — a phone doesn't download the huge desktop photo.
Si ta mendosh
Si rrobat në masa të ndryshme: secili merr numrin e vet.
Lexoje në anglisht
Like clothes in different sizes: everyone takes their own.
Shembull kodihtml
<img src="foto-800.jpg"
srcset="foto-400.jpg 400w, foto-800.jpg 800w, foto-1600.jpg 1600w"
sizes="(max-width: 600px) 100vw, 50vw" alt="...">