Limit picture size in forum responses?

Limit picture size in forum responses?

by Jan Waginski -
Number of replies: 2

Our students post pictures of their math work as a forum response. Is there a way to limit the size of pictures, or their resolution, or their dimensions? 

Average of ratings: Useful (2)
In reply to Jan Waginski

Re: Limit picture size in forum responses?

by Jan Waginski -

Limiting upload size in the forum settings seems to have no effect when students paste their picture as part of their response. The pictures are much larger than the maximum upload size.

Average of ratings: Useful (2)
In reply to Jan Waginski

Re: Limit picture size in forum responses?

by Sam Mudle -

Our students post pictures of their math work as a forum response. Is there a way to limit the size of pictures, or their resolution, or their dimensions? 

  • You could use CSS for your theme under whatever DIV class the forum posts use. Then force all images to be a certain width and height. (This is what I would do)

From:

https://stackoverflow.com/questions/12991351/css-force-image-resize-and-keep-aspect-ratio

For example, add this to your theme specific CSS

.img-responsive {
  max-width:300px !important
}

All of the images in a forum post are surrounded by the img-responsive class.  The stackoverflow link has a ton more nifty tricks depending on how fancy you want things to be.

This wouldn't actually decrease the file size of the image, it would just squish the image down.  

Average of ratings: Useful (1)