Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Auto Image Resizing?
Avatar
Bertone Romania
Member
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 4:56 am

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.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 5, 2013 - 6:00 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Bertone Romania
Member
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 6:18 am

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 800x600 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 (4000x3000 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 ....

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 8:35 am

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...

Avatar
Bertone Romania
Member
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 11:34 am

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

 

thanks

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 12:38 pm

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...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 1:43 pm

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...

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 5, 2013 - 1:47 pm

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

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 2:02 pm

yes, two php variables... post_max_size and upload_max_filesize...

Avatar
Bertone Romania
Member
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2013 - 6:55 pm

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!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625