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

Closes #3725: Hard code higher WebP conversion quality setting until configurable for GD in core. #3728

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

joeparsons
Copy link
Member

@joeparsons joeparsons commented Sep 17, 2024

Description

Alternative PR for #3725 that adds custom Drupal core patch that just hard-codes increased WebP conversion quality value in Drupal core's GD image toolkit code.

Related issues

Closes #3725

How to test

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My change requires release notes.

@joeparsons joeparsons self-assigned this Sep 17, 2024
@joeparsons joeparsons changed the title Closes #3725: Hard code a higher WebP conversion quality setting until configurable for GD in core. Closes #3725: Hard code higher WebP conversion quality setting until configurable for GD in core. Sep 17, 2024
@joeparsons joeparsons added bug Something isn't working patch release Issues to be included in the next patch release 2.11.x only labels Sep 17, 2024
@tadean
Copy link
Contributor

tadean commented Sep 17, 2024

@joeparsons patch does seem to enable lossless compression if it's available:

webpinfo lynx.jpg.webp 
File: lynx.jpg.webp
RIFF HEADER:
  File size: 1909782
Chunk VP8L at offset     12, length 1909770
  Width: 1920
  Height: 1080
  Alpha: 0
  Animation: 0
  Format: Lossless (2)
No error detected.

@joeparsons joeparsons marked this pull request as ready for review September 17, 2024 23:10
@joeparsons joeparsons requested a review from a team as a code owner September 17, 2024 23:10
trackleft
trackleft previously approved these changes Sep 17, 2024
tadean
tadean previously approved these changes Sep 18, 2024
@bberndt-uaz
Copy link
Contributor

Comparing the front pages of the Probo site for this PR with the front pages of previous PRs, it looks like the size of the Lynx image goes from 182 kB to 1.9 MB.

@joeparsons joeparsons dismissed stale reviews from tadean and trackleft via 87a3b4c September 18, 2024 17:18
Copy link
Contributor

@bberndt-uaz bberndt-uaz left a comment

Choose a reason for hiding this comment

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

With the latest version, the size of the Lynx image is 388 kB, which seems good to me.

@tadean tadean merged commit a69a47f into main Sep 18, 2024
16 checks passed
@tadean tadean deleted the issue/3725-hardcoded branch September 18, 2024 20:51
joeparsons added a commit that referenced this pull request Sep 18, 2024
…configurable for GD in core. (#3728)

* Closes #3725: Hard code a higher WebP conversion quality setting until configurable for GD in core.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.11.x only bug Something isn't working patch release Issues to be included in the next patch release
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Image quality degraded now that we convert images to WebP
4 participants