Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions assets/js/modules/srcset-detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ export const optmlSrcsetDetector = {
const targetWidth = Math.round(baseWidth * dprValue);
const targetHeight = Math.round(targetWidth / aspectRatio);

// Don't generate 1x DPR variations larger than current size
// Don't generate 1x DPR variations larger than natural image size
// But allow 2x DPR variations for retina displays
if (dprValue === 1 && targetWidth > currentWidth) {
// Fixes: srcset capped at profiling container width (issue #1030)
if (dprValue === 1 && targetWidth > naturalWidth) {
return;
}

Expand Down