Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
In `lazysizes.js` what do the width values in datasets actually do?

I'm using the JS plugin Lazysizes.js https://github.com/aFarkas/lazysizes

I'm using multiple images in data-srcset, but I'm confused as to what the trailing widths do, eg:

<img
    data-sizes="auto"
    data-src="image3.jpg"
    data-srcset="image3.jpg 600w,
        image1.jpg 220w,
        image2.jpg 300w,
        image3.jpg 600w,
        image4.jpg 900w"
    class="lazyload" />

Are these the constrained max proportions for each image?

Or are these the breakpoints at which the images are used?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The width defined in data-srcset is the decoded width of the image.

Breakpoints can be defined and mapped to individual image widths using the data-sizes property if you wish to have more control over using auto

Source: lazysizes repo links to this blog post explaining the syntax of a responsive image

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!