Glide image width

Hi i have this config to use glide 'glide' => [ 'original_media_for_extensions' => ['svg'], 'default_params' => [ 'fm' => 'png', 'q' => '90', 'auto' => 'compress,format', 'fit' => 'min', ], 'lqip_default_params' => [ 'fm' => 'webp', 'auto' => 'compress', 'blur' => 100, 'dpr' => 1, ], ], In frontend every image have this params https://www.mydomain.local/img/a7ce835c-97ce-4ed5-b2e5-218693a151c0/bioalleva-banner1.png?fm=png&q=100&auto=compress%2Cformat&fit=crop&w=1000&crop=1640%2C510%2C0%2C0 I need to change min width from 1000 to 1600 How can i do it? adding 'w' => '1600' it doesn't work 'default_params' => [ 'fm' => 'png', 'q' => '90', 'auto' => 'compress,format', 'fit' => 'min', 'w' => '1600' ],
No description
7 Replies
Kormi
Kormi2y ago
I need to use this image with width 1640... but in frontend w is always "1000"
Kormi
Kormi2y ago
i know $data['content_1_image'] = null; $content_1_image = $page ->imageObjects('content_1_image', 'default') ->map(function ($media) use ($page) { return @TwillImage::make($page, 'content_1_image', $media)->crop('default'); }) ->toArray(); foreach ($content_1_image as $k => $image) { if (isset($image['image']['src'])) { $data['content_1_image'] = $image['image']; break; } } This is how i get the image i need the crop i select in backend 1640x510 i don't understand how it set w=1000
kallefrombosnia
Per docs, you can specify your own values for that. Eg
$image->crop('listing')->width(600)->height(400);
$image->crop('listing')->width(600)->height(400);
Kormi
Kormi2y ago
is there a way to set a max-width? i need the exact crop selected in backend if i have an image 200x200 and set ->width(600) it broke it
kallefrombosnia
Its only example, picture will be cropped per configs, so your issue was when rendering images, it showed wrong width. That might be a bug or something is wrong configured/ provided by your side.
ifox
ifox2y ago
Are you using the Twill Image package or not? oh sorry I see it in your code you need to check the docs of that package to setup configuration agaisnt your image role
Want results from more Discord servers?
Add your server