Skip to content

Upgrade Glide to v3#2802

Open
antonioribeiro wants to merge 3 commits into
area17:3.xfrom
antonioribeiro:move-to-glide-3
Open

Upgrade Glide to v3#2802
antonioribeiro wants to merge 3 commits into
area17:3.xfrom
antonioribeiro:move-to-glide-3

Conversation

@antonioribeiro

Copy link
Copy Markdown
Member

This PR upgrades Glide from v2 to v3.

Glide v3 is now built on top of Intervention/Image 3, which is a pretty big deal. It brings a more modern architecture, better performance, and it can now use libvips as a driver, which is way faster than GD and Imagick for most operations.

The most interesting bits for Twill:

  • HEIC and AVIF: we can now handle HEIC images natively (basically every iPhone photo these days) and AVIF, which has better compression and quality than both JPEG and WebP. This is something people have been asking about for a while.
  • Progressive JPEGs and interlaced PNGs: images load progressively, so users see something on screen faster. Nice to have out of the box.
  • Custom encoders: added in 3.1.0, we can plug in custom encoders if we ever need to. Not something we need right now but good to have the option.
  • xxh3 for hashing: cache keys are generated faster now, not a huge deal but it's free performance.
  • Default quality is now 85: the old default was too low, 85 is a much better balance between file size and not making images look bad.
  • Original format is preserved: if you don't explicitly ask for a format conversion, the original format is kept. This was a bit broken before.

The whole codebase now uses strict typing and PHPStan v2, so it's generally more solid and less likely to break in weird ways.

What breaks

Older dependency versions are dropped, so minimum requirements go up. The encode manipulator is gone, replaced by the new encoder API.

Is it stable?

They've already shipped three releases (3.0.0 → 3.0.1 → 3.1.0) with quick bug fixes, and the community is actively contributing. Looks good to me. 👍

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