Juergen Posted May 21, 2017 Share Posted May 21, 2017 Hello @ all, it is possible to get the parameters of min and max dimensions of an image upload field set in backend via API on the frontend. I use an image upload field on the frontend and I want to show a hint for users that the uploaded image should be at a certain size. For this purpose I want to output the min and max sizes that I have set in the backend. Does anyone know how to get this values via API calls on the frontend? Best regards 1 Link to comment Share on other sites More sharing options...
kixe Posted May 21, 2017 Share Posted May 21, 2017 $fields->get('image')->getInputfield($page)->maxWidth; 6 Link to comment Share on other sites More sharing options...
Juergen Posted May 21, 2017 Author Share Posted May 21, 2017 Wow! Just that simple!! Thanks a lot - works as expected!! 1 Link to comment Share on other sites More sharing options...
SamC Posted May 21, 2017 Share Posted May 21, 2017 That was a handy tip, thanks @kixe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now