Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more resize modes #85

Open
ausi opened this issue Aug 20, 2021 · 5 comments
Open

Add more resize modes #85

ausi opened this issue Aug 20, 2021 · 5 comments
Labels

Comments

@ausi
Copy link
Member

ausi commented Aug 20, 2021

Should we add more resize modes like a version of box that adds a background color to the image to get exactly the configured size?

A general background color setting might be useful for other cases too like converting images with transparency to JPEG.

/cc @bennyborn
Related: contao/contao#3347

Are there other resize modes that might be useful?

@ausi ausi added the feature label Aug 20, 2021
@bennyborn
Copy link

IMHO "color" should also include transparent.

From my own experience with customers I'd also suggest the option to "blow up" images beyond their original size. I know it might look absolutely crappy but "normal" users are often not able to provide images for news or events that meet the minimum required resolution to fit nicely into the layout.

@ausi
Copy link
Member Author

ausi commented Aug 20, 2021

I'd also suggest the option to "blow up" images beyond their original size.

We decided against this feature as it unnecessarily increases the network traffic. The upscaling should happen on the client side. See also #48 (comment)

IMHO "color" should also include transparent.

Agreed. And transparent should be de default I think.

@asaage
Copy link

asaage commented Aug 20, 2021

A version of box that adds a background color to the image to get exactly the configured size without increaseing network traffic can also be achived o the client side with css.
For example if you put desired aspect-ratio and background-color on the .image_container and center the image within. 🤷🏼‍♂️

@ausi
Copy link
Member Author

ausi commented Aug 20, 2021

For example if you put desired aspect-ratio and background-color on the .image_container and center the image within. 🤷🏼‍♂️

You can even do that with the image itself, see contao/contao#3347 (comment)

@ausi
Copy link
Member Author

ausi commented Aug 20, 2021

A version of box that adds a background color to the image to get exactly the configured size without increaseing network traffic can also be achived o the client side with css.

I think adding a solid background color should not increase the image size too much as most image formats can compress such things very good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants