Skip to content

Add more resize modes #85

Open
Open

Description

@ausi

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?

Activity

  1. bennyborn commented on Aug 20, 2021

    @bennyborn

    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.

  2. ausi commented on Aug 20, 2021

    @ausi
    MemberAuthor

    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.

  3. asaage commented on Aug 20, 2021

    @asaage

    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. 🤷🏼‍♂️

  4. ausi commented on Aug 20, 2021

    @ausi
    MemberAuthor

    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)

  5. ausi commented on Aug 20, 2021

    @ausi
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions