Closed howdu closed 1 year ago
@howdu hi, thank you for your fix, but i think It's now safe, because we can pass string 60em
mb just use (int)
?
@lotarbo thanks yeah I thought that too would be cleaner too, but Glide uses only px and it's Filament ImageColumn::getWidth()
which adds the 'px' so the reason I went with the str_replace.
Let's see what @awcodes thinks.
@howdu i mean we can do this ->width('50em')
and ImageColumn::getWidth()
return 50em
@howdu i mean we can do this
->width('50em')
andImageColumn::getWidth()
return50em
I think that would be the same issue where Glide wouldn't resize the image because it only accepts px
@howdu yeah i know, it creates url
article-1.jpg?w=50em&h=50em&fit=crop&fm=webp&s=e6f52076e0f547afebb787baddfcc271
and glide doesn't crop image
i only think if we pass int in all situation
article-1.jpg?w=50&h=50&fit=crop&fm=webp&s=e6f52076e0f547afebb787baddfcc271
but you right, maybe better do nothing in this)
Let's go with (int). It's be faster and safer that a preg_replace.
Thanks.
Awesome. Thanks again.
Fixes https://github.com/awcodes/filament-curator/issues/210
Also adds
resolution
to allow the resized image to be upscaled for HD quality.