0

Maybe it is something simple. Is there any way to force users to upload images only with a given ratio - e.g. 16:9? (Joomla 3)

thx

  • Uploading them using what? Joomla's media manager? A 3rd party extension? Yes, it would be possible, but it would mean having to develop a plugin to override the upload function – Lodder Oct 20 '15 at 9:27
  • Technically, if you want to check the ratio before uploading you have to use javascript FileReader to Canvas, read dimensions and then if they check out enable the actual upload. stackoverflow.com/a/13939150 – Ville Niemi Oct 20 '15 at 10:35
  • Since that only requires javascript, you could do it with anything that can add javascript to specific pages, plugins, modules, template edits... – Ville Niemi Oct 20 '15 at 10:37
  • Have you tried any 3rd party components? I know there are some that offer this functionality. – jonboy Oct 20 '15 at 12:16
  • I use JCE Editor. Users can upload images using this editor. I thought there may be a global setting in Joomla 3 configuration that would allow me to restrict all images to have the given ratio (16:9). Is there any extension that would allow me to do that? Can I do it with JCE Editor (so that I don't need to install anything else)? If possible I'd like to make it globally so that even editors are restricted (from backend) but JCE Editor (frontend) is a must. – aretai Oct 20 '15 at 20:43
2

You can maybe "cosider" some users dont have the image In this ratio.

You can use JCE editor with plugin image manager extended to possibility user crop his image in this ratio.

https://www.joomlacontenteditor.net/component/zoo/item/image-manager-extended-4

  • thank you for information. What I'd like is to make the manipulate image (e.g. crop) to this ratio or display message to user to upload in given dimension (bit harder for users). I've also found a setting in JCE Editor - in the image section that is for adding some css and styles - maybe it would be possible to tweak it so that to fit my need – aretai Oct 20 '15 at 20:45
  • Some image galleries can be configured to convert uploaded images to specific ratio. But I don't know of any that really integrates well with articles. Blog components like EasyBlog have restricted editors with restricted image upload capability. JCE Media Manager extended allows user to change size on upload but I do not know of setting to force that. – Ville Niemi Oct 20 '15 at 22:33

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.