How to check the width of image in Alloy editor

Hi ,
I have a requirement where I need to stop user from uploading image with width is more than 300px.
I already tried imageAdd and beforeImageAdd to get image width, but no luck :frowning:
Can anybody help me?

Others will confirm this, but I don’t think Alloy has any image manipulation features. I use Alloy a lot and have never seen anything, althouyh I’ve never looked.

There are though many php scripts that you can add to either the image-upload folder, or another folder, that will then look for image files in a specified folder and resize them on the fly. With some, you might need to turn on ImageMagick on the server, but there are others that don’t require it.

appreciate that for some users using scripts is a bit daunting, but it’s normally really simple, and they often be added to the server via an HTML page in RW itself.

Here are a few few options…

1 Like

Limiting the size, whether the physical size or the file size, is not a possibility in Alloy.