I need a solution that will prevent large images from overflowing their column width and breaking the theme. I have searched the forums, and the best solution I found seems to be this:

<script type="text/javascript" src='misc/jquery.js'> </script>

<script type="text/javascript">
jQuery(document).ready(function() {
    var h;
    $(".node .content img").each(function() {
        if($(this).width() > 100) {
            h=$(this).height()/$(this).width()*100;
            $(this).attr({height : h });
            $(this).attr({width : "100"});
        }
    });
})
</script>

http://drupal.org/node/173586

Unfortunately, it isn't working for me in Drupal 6.4.... I am using FCK editor with its file browser and support for uploaded images & offsite images.

I would like one image size to display when viewing in teaser form in 4 columns, and another to size to display when viewing full page in 3 columns, in both cases limiting the size so they do not overflow the theme width.

Comments

typehost’s picture

Image / Image Attach & Image Assist do seem to give close to what I am looking for, but...

1. No ability to edit the page & images together in the WYSiWYG editor
2. image assist has two buttons or text links above & below the editor - difficult to understand & use
3. does not stop the addition of offsite images through the editor (unless add image button is disabled altogether in FCK editor)
4. not interested in images created as a node

sidharth_k’s picture

It can dynamically resize your image if it is bigger than a certain dimension

typehost’s picture

I did look into imagecache as an alternative solution, it is excellent, but I want the posts edited from the WYSIWYG more or less exclusively. As it turns out, the issue here was in the "content" region not being defined in the CSS for the theme I am using. See solution at:

http://drupal.org/node/310505