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

Replace the featured image with WebP version when available #316

Merged
merged 2 commits into from May 2, 2022

Conversation

mitogh
Copy link
Member

@mitogh mitogh commented Apr 24, 2022

Summary

When a modern format is available to render the featured image make sure that the replacement image uses the same logic used to replace the images in the content in order to be consistent
with the rest of rendered format.

Fixes #288

Relevant technical choices

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

When a modern format is available to render the featured image
make sure that the replacement image uses the same logic used
to replace the images in the content in order to be consistent
with the rest of rendered format.

Fixes #288
@mitogh mitogh added [Type] Enhancement A suggestion for improvement of an existing feature [Focus] Images Issues related to the Images focus area labels Apr 24, 2022
@mitogh mitogh added this to the First release after 1.0.0 milestone Apr 24, 2022
@mitogh mitogh self-assigned this Apr 24, 2022
@masteradhoc
Copy link

Thanks for the PR @mitogh!

Copy link
Member

@adamsilverstein adamsilverstein 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, nice work!

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

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

@mitogh Great work!

modules/images/webp-uploads/load.php Outdated Show resolved Hide resolved
@felixarntz felixarntz changed the title Replace the featured image to a modern format Replace the featured image with WebP version when available May 2, 2022
@felixarntz felixarntz merged commit ea67f4d into trunk May 2, 2022
@felixarntz felixarntz deleted the fix/288-featured-image-in-webp branch May 2, 2022 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Images Issues related to the Images focus area [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background images does not uses the *.webp version in the content if present
4 participants