contao / image

Contao Image Library
12 stars 5 forks source link

Max zoom density setting #102

Open ausi opened 7 months ago

ausi commented 7 months ago

Currently if you have an image with a very small important part and an image size with a zoom level of 100% you will get very small images that will be shown blurry to the user as they will get upscaled by the browser.

It might make sense to add a setting for a minimum density that ensures that the zoom will stop as soon as the minimum density is reached. Possible names: zoomMinDensity, maxZoomDensity,โ€ฆ

/cc @Toflar

leofeyer commented 7 months ago

maxZoomDensity ๐Ÿ‘

aschempp commented 7 months ago

I my case such images would still be blown up by the browser to fix their div, that wouldn't change, would it?

ausi commented 7 months ago

I my case such images would still be blown up by the browser to fix their div, that wouldn't change, would it?

@aschempp Can you describe your case in more detail? What does โ€œto fix their divโ€ mean?

aschempp commented 6 months ago

I think with or height 100% is what I mean ๐Ÿ˜…

ausi commented 6 months ago

I think with or height 100% is what I mean ๐Ÿ˜…

๐Ÿ‘

I my case such images would still be blown up by the browser to fix their div, that wouldn't change, would it?

@aschempp Can you describe your case in more detail? This setting should prevent upscaling in the browser as it limits the maximum zoom level that can be applied and thus results in larger (more pixels) images. But as I donโ€™t know anything about your case Iโ€™m not sure if this applies there.

aschempp commented 6 months ago

I can't really, I was just thinking about the consequences. But the config makes sense (if I understand it correctly).