Skip to:
Content
Pages
Categories
Search
Top
Bottom

Max image size?

  • How can I set the max image size, site-wide? I want to make it so that if a user posts a picture that’s 6000px wide, it will automatically shrink it.
    I tried using the max-width css attribute but I must be doing something wrong. I’m using the Unplugged theme if that matters.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anyone got some input on this?


    @mercime
    Keymaster

    @mercime

    If you created a parent theme and your subsites have child themes based on parent theme, add this to parent theme’s functions.php file
    `<?php
    /* force max-width for images and embeds */
    $GLOBALS = $content_width = 600;
    ?>`
    change 600 to whatever image size you want. This will override whatever number you set in individual sites’ Media settings for “Large”

    As for implementation for all different themes within your installation, you could create a new file `my-maxwidth.php`, paste the code given above there and upload to mu-plugins folder. Make sure that the width you add there is good for all the themes you have allowed for use of members in Super Admin > Themes.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Max image size?’ is closed to new replies.
Skip to toolbar