How to Adjust Image Size in a Banner with a Mask Element?

This topic has 2 replies, 2 voices, and was last updated 2 weeks, 5 days ago ago by Luca Rossi

  • Avatar: Merin
    Merin
    Participant
    December 6, 2024 at 12:00

    “I am using a banner with a mask element on this page
    https://anandk60.sg-host.com/test-for-careers/
    and need to adjust or reduce the image size. Despite trying various values, the changes are not taking effect. How can I resolve this issue?

    Files is visible for topic creator and
    support staff only.
    1 Answer
    Avatar: Justin
    Luca Rossi
    Support staff
    December 6, 2024 at 18:17

    Dear Merin,

    We hope this message finds you well.

    The appropriate dimensions for the banner image should be 50×50 or one of the predefined sizes such as thumbnail, medium, or large. However, it seems that the srcset attribute generated by WordPress is forcing the image width to 100%.

    To address this issue, we recommend adding the following custom code to the functions.php file located in your child theme. This will disable the srcset functionality:

    
    add_filter( 'wp_calculate_image_srcset', '__return_false' );  
    

    Please let us know if you need further assistance or have any questions.

    Best regards,
    The 8Theme Team

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.