What site settings are available to Discourse admins for controlling height and width of images in posts? And how can admins ensure that mobile view shows posted images full width of the topic page?
What site settings are available to Discourse admins for controlling height and width of images in posts? And how can admins ensure that mobile view shows posted images full width of the topic page?
Found 88 results for 'height,width,image,mobile'
Reading context for: max_image_width
Reading context for: max_image_height
Reading context for: responsive_post_image_sizes
For administering the height and width of images in posts, the following site settings are relevant in Discourse:
max_image_width
max_image_height
responsive_post_image_sizes
1|1.5|2
), Discourse uses specific pixel ratios to resize lightbox preview images, enhancing mobile and retina screen visuals.To ensure images take up the full width of the topic page on mobile, the responsive behavior (responsive_post_image_sizes
) plays a key role. Disabling or tweaking thumbnail limits (max_image_width
and max_image_height
) can also affect how images scale on smaller screens. Adapting these settings together can help make images look more dynamic and cover the full width effectively.
Would you like instructions on modifying these settings or guidance on how they interact further?
yes please, describe the as if I was a new admin.
Absolutely, let’s walk through these settings step-by-step, assuming you’ve just started as a Discourse admin. I’ll explain not only how they work, but also how you can adjust them to suit your community’s needs.
max_image_width
max_image_width
.900
will allow images to appear wider before they get resized.max_image_height
What It Does: This is similar to max_image_width
but applies to the height of images. If images are taller than this limit, Discourse resizes them down while preserving aspect ratio.
Default Value: 500 pixels.
Why It Matters: It keeps extra-tall images from towering over other content and making posts difficult to read.
How to Modify:
max_image_height
in the admin settings.Interaction with max_image_width
:
If an image surpasses both the width and height limits, it will resize to whichever limit is lower to maintain its aspect ratio.
responsive_post_image_sizes
1|1.5|2
1
means 100% of the original image size,1.5
means 150% of standard DPI,2
sets an image up for retina-quality displays.responsive_post_image_sizes
in the admin settings.1|2|3
would allow even higher DPI display for ultra-sharp images.If you want image thumbnails to always span the full width of the screen (or topic area), especially for mobile devices:
max_image_width
to at least 700 (or higher depending on your forum’s layout).
responsive_post_image_sizes
active, or ensure a relevant ratio for common devices like 2
(retina) exists.
img {
max-width: 100% !important;
height: auto !important;
}
Would you like more advice for testing or mobile layout troubleshooting?
no thank you.
You’re very welcome! Feel free to reach out if you have more questions in the future. Good luck with managing your Discourse forum, and have a great day!