I have a server-side command defined to receive images uploaded with TinyMCE (file upload or drag-and-drop). I have the image in my hands as a binary which I then write to my server.
I was testing with this image taken with my iPhone. The original photo was 3024 x 4032. In the editor we can resize, but still the original 4.9 MB image would get saved on the server side. I was thinking there are probably server-side scripts we can add to rescale/resize it. Anybody know of any that can be used when saving images?
The image is a binary, and might be JPEG or might be PNG. It even might be GIF.
For this example, I used Preview on the Mac to resize my picture to 500 pixels wide before uploading, which reduced the size to just 191 KB. It would be great if this could do that using JavaScript once I have the image in hand. Any thoughts? Thanks.
It turns out my (not very standard) server has some built in commands to rescale and optimize image binaries. I added those to the backend upload processor and it works great. It makes editing a lot easier, saves a lot of space on the server, and email notifications containing the images open much quicker. So this issue is good for now.
My answer won't be of any help to a user using an ordinary Apache/PHP server though. But I imagine there are lots of libraries for those.