Open GoogleCodeExporter opened 9 years ago
I think this is tough without rewriting WP's image manipulation functions
entirely -- WP's image editing stuff is not writing in a way to make it
reusable in any sense. But really, you can't enforce image sizes using PHP
because you don't know the size of the image until after the image is uploaded.
Probably better to set the dimensions you require in the templates. The image
itself should be "viewless", usually the original size, and then your views can
specify the size you need to display. Cropping etc. is a separate issue...
Original comment by ever...@fireproofsocks.com
on 17 Oct 2013 at 3:20
I understand that WP's image uploader is not the most developer-friendly thing,
but I saw this functionality as being after that has been called. In other
words - after the image has been uploaded and "Insert into post" is clicked,
when the user is returned to the post editing screen. Then CCTM can check the
image dimensions and present a dialog that the image is the wrong size, and ask
the user to crop it before resizing it.
Original comment by pe...@twobytwo.co.uk
on 17 Oct 2013 at 3:28
Original issue reported on code.google.com by
pe...@twobytwo.co.uk
on 17 Oct 2013 at 10:25