The client has asked for an auto resize of images (when inserting via the ckeditor) so to avoid the breaking of the layout, and including images that are just too big. Is there a way to automate this process? Do you normally offer this? Or do you just make the client aware of the width and height settings in the image properties window?
2 Answers
There are several ways of handling images inserted in a WYSIWYG editor. Which approach you take is depending on needs and how technical the client is.
If you let users set a size in the editor either by manually specifying a size or by using the mouse, then I would recommend the Image resize filter module which automatically resize images to the width and height set in the editor. This reduces load times by not loading the original image.
You can use the IMCE module for both manual and automatic resize. You can resize using width/height value, or using predefined image dimensions.
You could also simply set a max-width
value in CSS for the images, but this might have an impact on loading times if the images are big, so I would not recommend it.
If you do some research I am sure you can come up with more options, but these would be the first that comes to mind.
Image styles are built into Drupal 7. You can define image styles to have a particular size, by either cropping, scaling, or some combination of the two. Drupal 7 also supports scaling only down but not up.
If you want to do this in Drupal 6, you do it by installing the Imagecache module and configuring your styles with that.