Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update picture source markup and make sizes attribute configurable from shortcode. #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Remove scale causing issues?
  • Loading branch information
nickreese authored Oct 15, 2020
commit 36f765d1eeb7ea43e6d0eeffd0f4bdde1ed930c3
2 changes: 1 addition & 1 deletion packages/images/utils/helpers.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ function getSrcsets(maxWidth, fileSizes) {
let thisSrcSet = out[cv.format][cv.width] || '';
// let thisSrcSet = '';
if (cv.scale === 1) thisSrcSet = `${cv.relative}${thisSrcSet}`;
if (cv.scale === 2 && thisSrcSet.length) thisSrcSet = `${thisSrcSet}, ${cv.relative} 2x`;
//if (cv.scale === 2 && thisSrcSet.length) thisSrcSet = `${thisSrcSet}, ${cv.relative} 2x`;
out[cv.format][cv.width] = thisSrcSet;
return out;
},