Skip to content

Add srcset attribute to img tag#190

Open
phaneendraandukuri wants to merge 14 commits intomasterfrom
enable-srcset
Open

Add srcset attribute to img tag#190
phaneendraandukuri wants to merge 14 commits intomasterfrom
enable-srcset

Conversation

@phaneendraandukuri
Copy link
Contributor

Added srcset attribute to the img tag to avoid Properly Size Images error in pagespeed insights

Ticket Reference: https://github.com/quintype/ace-planning/issues/469

Comment on lines +36 to +38
srcSet: `https://${imageCDN}/${image.path(aspectRatio, imgParams)}&w=320 320w,
https://${imageCDN}/${image.path(aspectRatio, imgParams)}&w=640 640w,
https://${imageCDN}/${image.path(aspectRatio, imgParams)}&w=1024 1024w,`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we take this width value from props?

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.

2 participants

Comments