Support Forum

Auto Image Resizing?

BR Bertone Romania
Bertone Romania
Member

Hello guys,

My users complain that they have to manually resize their photos to match the 1 mb limit.

How can I help them by leting them upload any size and then auto-resizing to what I can host? (0.5-1 mb per photo).

 

In this moment I use the plugin for Upload Media from SP.

Thank you.

10 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

We have no tools that will allow for uploading images larger than the limits you have set.

You are also limited by whatever your host has pre-set in your php ini file (or you if you can manually override it). It is not possible to upload a file larger than this restriction. An upload limit is an upload limit – as simple as that.

It is also worth mentioning that you need to be aware of the cost. Don’t forget that if you allow a user to upload a file of say, 1 MB – then EVERY time someone downloads it – views it if an image – then that is going to eat up 1 MB of the bandwidth you pay your host for. If you have a lot of users then that can get pretty costly. Far better to train your users to behave more responsibly.

BR Bertone Romania
Bertone Romania
Member

Ok, let me try to explain again to you what I need.

I need to let users upload pictures regardless the size or the dimensions and then have them automatically resided and re-dimensioned to fit some limits, lets say for example 800×600 and 0.5 mb. (and only store on the server the resiez image)

I have users that give up posting and presenting their cars because they cannot upload their default pictures from the camera (4000×3000 and 5mb for example) and they don`t have the knowledge and time to resize and manipulate photos to fit the forums limitations.

The server or the php limitations ar not a problem as I can change them ….

MP Mr Papa
Mr Papa
Member

we understood it the first time…  but simple press is not an image manipulation package… nor do we intend for it to become such…  so we dont have any facility for manipulating the image as you suggest…

BR Bertone Romania
Bertone Romania
Member

Ok, so you don`t want to develop this facility but can you at least provide a integration with such a script?

 

thanks

MP Mr Papa
Mr Papa
Member

of course… we provide a robust api now that can be used for this…  we have numerous hooks, actions and filters that can be used to accomplish this in a plugin for simple press…  it just needs to be written… and if one finds there are some additional hooks to add the desired functionality, given a reasonable use case, we will happily add them…

MP Mr Papa
Mr Papa
Member

Its also worth noting that we do already include some basic resizing functions with our uploader…  so you might be able to get where you want – assuming you can set some significant php parameters as you indicate…

so I dont know if you noticed or now, but on forum – content – uploads, you can set a max width and height for images uploaded…  if the image is larger than that, it will resize it to fit your settings…  this will reduce the overall file size too…  additionally, you can set an image quality on the resize too on the same panel… so its getting resized, you can lower the quality to again reduce the file size…

the biggest kicker is this all happens server side, so the file has to physically be uploaded before we can do anything to it… so your php settings for max upload size has to support it… and the file will need to be smaller than the max size you set on forum – components – uploads to pass the first check…

but assuming you get there, then you can ‘sort of’ help control the image dimensions and file size with those above mentioned settings…

so you  have some basic control already, just not a true image editing facility…

 

YS Yellow Swordfish
Yellow Swordfish
Member

Would the max post variable size have to be dramatically increased as well?

MP Mr Papa
Mr Papa
Member

yes, two php variables… post_max_size and upload_max_filesize…

BR Bertone Romania
Bertone Romania
Member

Well, that is what I needed. I`ve set the upload_max_filesize to 20 mb and unlimited in forum > upload files and restricted the dimensions to 1200 x 900 and 97 .jpg quality and I got what I needed.

Thanks!