0

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?

  • this sounds like a job for CSS and some max-width or max-height declarations. – Jimajamma Mar 8 '13 at 1:23
0

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.

|improve this answer|||||
0

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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.