[resolved] Theme Ten Eleven is resizing large images wrong (6 posts)

  1. s.m.a
    Posted 3 years ago #

    Hello everyone

    I am facing an image size problem with my own theme that is based on the ten eleven theme. I created a new image size with a width of 660px. In the css I changed "#page", "#content img" and ".one-column #page" to a width of 960px and I don't have a sidebar. But when I insert a large picture into the post, wordpress resizes the image to a width of 584px.

    I read somewhere, that the maximum image width of ten eleven is 584px for the uploader. But where can I change it when it is not responding to my changes in the css?

    Thanks for your help!

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    You need to change $content_width = 640; in functions.php

  3. jimmerd
    Posted 3 years ago #

    Do you mean Twenty Eleven?
    If so, content width is set in the functions.php file, line 45:
    $content_width = 584;

    And I feel the need to give the usual recommendation that it's best to make a child theme for Twenty Eleven. This prevents problems when the parent theme is upgraded.

    I'm frankly not sure if editing the content_width line is a good idea. Worth a try. BUT best to do in child theme. There are many tutorials on making child themes. It's best practice.

  4. s.m.a
    Posted 3 years ago #

    Great, thank you two! I will check it out this evening, but it sound exactly what I was looking for.

    I have build my own child theme, which is based on Twenty Eleven. Don't know why I wrote Ten Eleven ;) But of course I will change it in the function.php of my child theme. Thanks again!

  5. s.m.a
    Posted 3 years ago #

    It works perfectly, thanks again!

  6. neononcon
    Posted 3 years ago #

    This thread helped me but just wondering why the settings in admin>settings>media aren't working? For example, setting the large image maximum size to Width: 600px and Height:0. Shouldn't that give you the resized options when uploading into a post? All of the sudden it was resizing everything to 584px despite the settings =/

Topic Closed

This topic has been closed to new replies.

About this Topic