Skip to content

Varied sizes of image crops #1556

Answered by pboivin
ChrisB-TL asked this question in Q&A
Mar 31, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @ChrisB-BTL,

If you're using the Glide service (or any service that supports dynamic transformations), you can pass an array of parameters as a third argument to image() :

$page->image('cover', 'square', ['w' => 100]);

You can find all the Glide transformations here : https://glide.thephpleague.com/2.0/api/quick-reference/

I believe Imgix is using a very similar set.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChrisB-TL
Comment options

Answer selected by ChrisB-TL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants