Support » Fixing WordPress » Image not resizing in WYSIWYG

  • Resolved zeckdude


    I am inserting photos into my post using the WYSIWYG editor in the admin area of WordPress. I am using the twentyten theme.

    When I insert photos into the post, it will insert the full size image. At this point I would like the client to be able to resize the image from within the WYSIWYG editor. It does provide resizing controls on the corner of the image, and when I use those to resize it, the photo appears smaller in the WYSIWYG editor, but it still shows the full size image on the web.

    Why is the image not resizing using the controls in the WYSIWYG editor?

    I know I can use the 3 pre-determined thumbnail options, but I would like the user to be able change the size of the image by eye.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Doesn’t work that way. You have predefined image sizes, and that’s that. You can create a theme to have more possibilities for image sizes, but you can’t make it drag/drop image sizes directly from the editor.

    Why do they include the resize controls in the WYSIWYG editor in the first place then if they don’t have any function?

    Do you know of any themes or plugins that have the functionality I am looking for?

    Otto, according to I should be able to visually change the size of the image in the WYSIWYG editor using the resize control bars.

    Why are you so sure that you can only use predefined image sizes?

    Have to agree Otto, sorry.

    Look in your CSS for something like #content img

    is there a width:auto; set? if so delete it. It should then work OK.

    However it does need amending in the default TwentyTen theme, IMO.

    Rich ‘elfin’ Pedley,

    That was exactly the problem. For some reason, the twentyten css file has it as width: auto.

    I will simply change that css in my child theme css file.

    Thank you.

    I used twentyten and ran a quick test, but it confused me for a while.

    Otto is correct, you can’t change image sizes like that. However you can change the size dimensions which are applied to an existing image, ie: via the markup.

    If the changes you are implementing in the back-end aren’t showing up on the front-end, then your CSS is presumably over-riding those image dimensions set in the markup (ie: width and height settings on the IMG tag itself).

    EDIT: I just realised I repeated what Rich ‘elfin’ Pedley and zeckdude said above.

    For those of you using the TwentyTen theme, try changing the following in your style.css:

    #content img {
    margin: 0;
    height: auto;
    max-width: 640px;
    width: auto;

    to this:

    #content img {
    margin: 0;
    max-width: 640px;

    I’m not sure if those auto widths and heights are needed for something else so hopefully it doesn’t break some other edge case situation which I haven’t thought of.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Yes, I see what you’re talking about now.

    I think this is probably a bug in WordPress, or at least some kind of oversight. It shouldn’t be using the attributes of the image tag to do resizing like that.

    In Andrew Nacin wrote: It was designed to fix an IE8 bug, I believe. I’m having someone look into the side effects.

    See also

    I’m having a similar problem and have changed the CSS as suggested above,but still no joy. When I try resize using width and height values in the image tag, it works in the visual editing mode, but when I update the page and view it, image size is back to original.

    Have you made sure you cleared out your browser cache before trying to view the changes?

    Thanks , but that hasn’t helped.

    Hi namklin, sorry it did do the trick, thanks.

    ryanhellyer, I had this problem as well and your fix did the trick for me, too. Thx!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Image not resizing in WYSIWYG’ is closed to new replies.