Home>Support>Set image height in SiteOrigin Image widget

Set image height in SiteOrigin Image widget

Is it possible to set image height somehow with the image widget?

I would like a max height of, say, 300px and for the widget to crop the image accordingly.

Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Adam,

    Yes, it’s possible to do this but it depends on the type of crop you’re after. If you’re after a standard WordPress image crop, no, this isn’t possible without some custom coding. If you’re okay with the image simply being resized with CSS, than yes, this is possible.

    For the latter, please open the SiteOrigin Image widget you wish to affect and head over to the Widget Styles sidebar. Set the Widget Class to max_height-300 and then save the page. Please navigate to WP AdminAppearanceCustom CSS and add the following CSS:

    .max_height-300 img.so-widget-image {
    	width: auto;
    	max-height: 300px;
    }
    

    How does that look?

    You might also need to install the SiteOrigin CSS Editor.

    For the former, we recommend using Codeable. You’ll be able to hire someone at an hourly rate to do this work for you.

  2. 7 years, 1 month ago adamdagg

    Great!

    Thanks so much for your help!

    -Adamdagg

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More