Image upload: how to limit the size/weight of original

Author Message

Piotrek Karaś

Thursday 04 October 2007 1:46:49 am

Hello,

The way I understand eZ Publish works with images is that it stores/keeps the uploaded original image of permitted weight (min. 1MB), which it uses for further resizing according to image presets and configuration.

Unfortunately, not all sites require an original of up to 1MB (which is comparatively a lot). Is there a way to setup eZ Publish to manipulate/resize the original, just as other image presets are?

For example: user uploads a large image of 1MB which automatically gets resized to 800x800px or 200KB and from then on taken as original for further use.

Or do I miss something?

Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kristof Coomans

Thursday 04 October 2007 7:37:21 am

Hi Piotrek

I found this in settings/image.ini:

# By defining the 'original' alias and setting some filters
# or changing the MIME type you can even force a conversion of
# the originally uploaded image.
# This is useful to save space or make sure the image is in a specific format
# [original]
# Filters[]
# Filters[]=colorspace/gray

I hope this helps you getting on the right track :)

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Piotrek Karaś

Thursday 04 October 2007 8:49:11 am

I have no idea how we've missed it ;) Amateur mode ;)
Well, that exactly it and working fine, even in my fresh and fast installation of eZ4alpha ;)
Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Andy Caiger

Wednesday 07 April 2010 12:19:04 am

So what should go in image.ini to force all uploaded original images to automatically get resized to 200KB? The geometry filter allows us to change the dimensions of the image in pixels or by a percentage, but what about the number of bytes used?

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.