Adding a default max-width (and max-height) for TinyMCE > Add images?

Permalink
The image block is great, and once I found out about how to put default max-width and max-height values on images, I felt very comfortable about telling clients to not worry too much about image sizes.

But sometimes images have to be added inline within text in a regular content block.
Is there a way to add default max-width and max-height values for these images? (like with the image block form.php row 82)

Note: I'm not talking about css, I'm talking about generating a proper sized thumbnail image.

Thanks!

Jaakko
View Replies:
planist1 replied on at Permalink Reply
planist1
Jaakko replied on at Permalink Reply
Jaakko
Thanks for the link.

That solution is far too heavy for this case. All I need is the same functionality to the TinyMCE > Add image -feature than what the image block itself has.

The Tinymce > Add image already creates the thumbnail, but the height and the width have to be manually changed in the (kind of ugly looking) tinymce image menu. It's not too big of a deal, but if there could be a way to set some reasonable defaults for maximum width, it would be great.

I mean, how many times would someone publish a 2000px wide image with the content area. Since the areas are usually 300px-600px wide.
planist1 replied on at Permalink Reply
planist1
I think the default dimensions come from the file manager upon uploading and then get modified in the content block using the typography.css or the inline css modification of the image box. Could you put something like the following in the typography.css file to control the max dimensions?

img {
height: auto !important;
width: auto !important;
max-width: 640px !important;
}


Just a thought. And then create other classes to handle images that need to be larger?
Jaakko replied on at Permalink Reply
Jaakko
Thanks for the answer but that doesn't work.

That would make it appear correct but the image would still be the original size, which would make the page load slow. This isn't about css.

The editor already creates a thumbnail version of any image put in it via the "add images" link.

But, the problem is that that thumbnail has, by default, the same dimensions as the original image. A user has to manually click the "insert/edit image" icon and set the suitable dimensions.
planist1 replied on at Permalink Reply
planist1
Then I would think you would want to modify the way c5 uploads the images... maybe something in the root/concrete/tools/files/image/process.php file?