Skip to content

Conversation

@aatanasov-cloudinary
Copy link
Collaborator

@aatanasov-cloudinary aatanasov-cloudinary commented Jan 28, 2026

Description

In some cases, DPR might look like those numbers:

  • 1.6666666666666667
  • 1.1041666269302368

Which generates a lot of asset versions.

Approach

We round the number, and the step is 0.5, and the closest one will be used. Examples:

  • 1.6666666666666667 => 1.5
  • 1.1041666269302368 => 1
  • 1.766766 => 2.0
  • 1.976 => 2.0
  • 1.33333213 => 1.5

QA notes

  • Enable the Lazy Load feature.
  • Select the Auto 2x option from the DPR Settings.
  • Go to a page with images delivered by Cloudinary.
  • Zoom in/out on your browser (refresh the page before each test).
  • Ensure the DPR in the URL is rounded (e.g 1.0, 1.5, 2.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants