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

Add image_srcset generated from image_url, use in topical events logo #3237

Merged
merged 1 commit into from
May 2, 2023

Conversation

KludgeKML
Copy link
Contributor

@KludgeKML KludgeKML commented Apr 26, 2023

Generates information about other image sizes suitable for using in a srcset

https://trello.com/c/uW5kvqga/1961-using-srcset-functionality-to-make-images-less-blurry-on-govuk

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

@govuk-ci govuk-ci temporarily deployed to collections-pr-3237 April 26, 2023 10:59 Inactive
@govuk-ci govuk-ci temporarily deployed to collections-pr-3237 April 27, 2023 09:14 Inactive
@govuk-ci govuk-ci temporarily deployed to collections-pr-3237 April 27, 2023 09:18 Inactive
@KludgeKML KludgeKML changed the title expose srcset so frontend can see it Expose srcset-appropriate image variants to frontend of topical events. Apr 27, 2023
@govuk-ci govuk-ci temporarily deployed to collections-pr-3237 April 27, 2023 10:35 Inactive
- Because the filenames for varient image sizes are predictable, we
  can use them to generate a set of optional images to use as a srcset
  to try out this technique.
- Not quite perfect, but here we allow x2 and x3 image sizes to work with
  screens with higher pixel density, meaning 300w is x1, 630w is x2 (ish),
  and 960w is x3 (ish).
@KludgeKML KludgeKML force-pushed the topical-events-logo-srcset-spike branch from 6a1e901 to b2f87ee Compare May 2, 2023 10:52
@KludgeKML KludgeKML changed the title Expose srcset-appropriate image variants to frontend of topical events. Add image_srcset generated from image_url, use in topical events logo May 2, 2023
@KludgeKML KludgeKML marked this pull request as ready for review May 2, 2023 10:54
@MartinJJones MartinJJones self-requested a review May 2, 2023 10:55
Copy link
Contributor

@MartinJJones MartinJJones left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@KludgeKML KludgeKML merged commit 1734f25 into main May 2, 2023
8 checks passed
@KludgeKML KludgeKML deleted the topical-events-logo-srcset-spike branch May 2, 2023 12:24
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.

None yet

3 participants