Is there a built-in way to set max image height and width?

Or is it only something you need to add as custom CSS. For example:

img {
    max-width: 550px;
    max-height: 550px;
}

The first trick to finding this kind of information by yourself is to use the browsers developer tools, inspect to see which classes are applied to displaying an image.

  • Additional css, themes, plugins etc… may sometimes change the outcome.
1 Like

No, you’ll need to use CSS to set max heights and widths (though you can set standard height and width with an $image widget, of course).

I imagine this is a limitation of HTML, not TW: HTML <img> tags don’t have max-height or max-width attributes either.

If you want to have some global settings it would be OK to set it with a CSS tiddler like this.

There are some height and width settings for the image-widget There also is the class parameter, which will allow you to be more specific about which images will have class-based settings.