How to Configure Image Styles for "Card Two Columns" and "Card Three Columns" bundles including options like resizing, scaling, or desaturating: A Step-by-Step Guide

Created on 1 June 2024, 6 months ago
Updated 27 June 2024, 5 months ago

Problem/Motivation

The image sections in card 2/3 column layout cut images if they do not fit the display area. E.g. top and bottom parts are cut off.
But there are cases where this is not desired such as logos. Here, images should be resized automatically to match the area (putting white space right/left or top/bottom where needed).

Steps to reproduce

Add a 2 card paragraph with a big image on one side and only little text on the other side.

Proposed resolution

Add a display option to display the whole image in a resized version.

User interface changes

Add a display option to display the whole image in a resized version.

Data model changes

unknown

πŸ’¬ Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany gruberroland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @gruberroland
  • Assigned to flashwebcenter
  • Status changed to Fixed 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX

    Hello,

    The "Card Two Columns" and "Card Three Columns" bundles use a nested bundle called "Card Image Section" for images.

    Card Image Section: your-site-dot-com/admin/structure/paragraphs_type/card_image_section_bundle/display

    It uses a media field for images and displays them with a responsive image style called "Card (PB)": your-site-dot-com/admin/config/media/responsive-image-style/pb_card

    This style includes four sizes for different screen widths, converting images to WebP and scale and crop them to fixed dimensions.

    Small: your-site-dot-com/admin/config/media/image-styles/manage/pb_card_image_sm
    Medium: your-site-dot-com/admin/config/media/image-styles/manage/pb_card_image_md
    Large: your-site-dot-com/admin/config/media/image-styles/manage/pb_card_image_lg
    Extra Large: your-site-dot-com/admin/config/media/image-styles/manage/pb_card_image_xl

    You can update the four image styles as needed, including options like resizing, scaling, or desaturating. When resizing, it's best to add either the height or the width, but not both, to avoid distorting the image.

    If you choose not to use the responsive mode and just create a simple resized image for a logo:

    1. Go to Image Styles (your-site-dot-com/admin/config/media/image-styles) and create a new style.
    2. Configure it as needed.
    3. Go to Media Display Settings (your-site-dot-com/admin/structure/media/manage/pb_media_image/display/pb_media_card).
    4. Under "Format," choose "Image" and select your new style in the settings.

    Note: This change will apply to both the "Card Two Columns" and "Card Three Columns" bundles. Changing the format affects all content using this bundle.

    Best wishes,
    Alaa

  • Status changed to Closed: works as designed 6 months ago
  • πŸ‡©πŸ‡ͺGermany gruberroland

    Thanks a lot, this helped! :)

  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX
Production build 0.71.5 2024