• Resolved trial3rror

    (@trial_error)


    I don’t understand how the Large image size works. Do I need to add support in my theme for the size that I specify in “Media settings”?

    After a clean install of WordPress, I go to “Media settings” and specify my three sizes, but when going to add an image to a post or page, looking at what sizes I can select from under “Attachment Display Settings” in the bottom right corner of the “Insert media” page, I never see my Large size. I see my thumbnail and medium sizes which follow what I specify in “Media settings”, but the Large size never displays my defined large size, but rather seems to take its values from the active theme. Am I not supposed to be able to select my Large size here (although it says Large in the dropdown)?

    I have troubleshot this on clean wordpress installs without plugins, in new databases, locally and on my web hoster.

    In short, why specify Large image size when I can never select it?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter trial3rror

    (@trial_error)

    OK, I’m a bit wiser now since I read this in the codex: Large: Displays a large-sized version of your image on the page/post. Note: WordPress will determine the width of the content column of your theme, and display the largest possible image for that space. Testing with theme 2015 I see the content column is exactly the width of the Large file in the dropdown (604px). Eureka! However, after changing the CSS to make this column wider (800px), the image width proposed for large is still the same.

    How does WP “determine the size” of the content column?

    The content width you refer to to is controlled by your currently active theme.

    Thread Starter trial3rror

    (@trial_error)

    Hi, thanks for answering.
    But how is it controlled and how can I tweak this control for my purposes? There must be something else than pure CSS involved. As evidenced in the image below, there is clearly space avalable to the right of the image since the text flows freely, but the large image size is still limited to 640px.

    Thread Starter trial3rror

    (@trial_error)

    But how is it controlled

    It is commonly controlled by a setup function or similar in the theme’s functions.php file. For example:

    if ( ! isset( $content_width ) ) $content_width = 980;

    would set a max width of 980px.

    and how can I tweak this control for my purposes?

    Ideally, by creating a child theme and then creating a custom function in the child theme’s functions.php file. That said, it does vary slightly from theme to theme – especially over-riding it via a child theme. I’d suggest first contacting the theme’s author and asking their advice.

    Thread Starter trial3rror

    (@trial_error)

    Thank you very much, Esmi! You’ve put an end to about 15 hours of hair-pulling.

    No problem. Glad I could help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Why specify Large image size when I can never select it?’ is closed to new replies.