1

Re: Resizing on image upload

Hi

I am using the data_entry_helper::file_box method to upload photos to the warehouse.
I have set resizeWidth and resizeHeight to 1024 and 768.
On selecting a photo (1944x2592) it is resized and uploaded to my website as expected (576x768), height being the limiting dimension.
However, on transferring this interim file to the warehouse it is resized again (1024x1365).

Is this expected behaviour and, if so, where is the second resize happening?

Jim Bacon.

2

Re: Resizing on image upload

The server also does resizing. See the section at the end of application/config/indicia.php. Client side resizing is only a means of reducing upload times rather than a definition of the final image sizes which are handled on the server, since client side resizing does not work on all browser setups. So it would make a lot of sense to resize the images to match the settings on the server for the largest image size (default = 1024 wide).

John van Breda
Biodiverse IT

3

Re: Resizing on image upload

Thanks for clarifying that. A useful tip to be consistent in our choice of maximum image size.

This raisies another question for me though, independent of client-side resizing.

I understand the merit of the server ensuring that large images are reduced in size to something more manageable. However, what are the benefits of enlarging small images? The resultant file takes up more storage space and a small image can always be enlarged by the browser if you want to view all images at a consistent size.

Jim.

4

Re: Resizing on image upload

There are no advantages other than perhaps image consistency on a website which did not set the width and height tags for images, which is undesirable anyway. More to the point though, this is simply a case which has not been coded for.

John van Breda
Biodiverse IT