View Full Version : Resize large photos on upload
March 13th, 2013, 11:52 AM
I have been trying to make resizing on upload work so that when a user has a picture that is too big, the system will resize it during the upload.
I've been having trouble and haven't got it to work yet.
Can you please tell me the settings that I would need to have for it to work?
The users that will use it have a 200kb filesize limit in their usergroup. I don't though but when I upload a file greater than 900 X 900 it fails, it doesn't resize.
It is set to use Image Magick.
Thanks for any help.
March 13th, 2013, 12:57 PM
To resize a photo you set the max width height dimensions under upload options in admin. The user group setting is the maxfilesize allowed to be uploaded.
March 14th, 2013, 04:15 AM
Hi & thanks for the reply. What I don't understand about that is why I can't upload a file that's really big, say 5MB and have it resized if my filesize limit is set to 0 which I thought was unrestricted. Should that just upload and get resized? The upload just fails.
Does it matter that I'm in a number of usergroups? For instance, I'm in registered users which has a filesize limit of 200kb. My default group is Administrator though and that has 0 in the file size limit.
We have a lot of members who are not very good at resizing their photos and I was hoping that Photopost would just resize the uploads to the maximum dimensions which would bring the pictures under the upload limit even for the others. Will it do that?
Just to check my settings, under upload photo options there is:
Trigger medium graphic height and width
An uploaded larger than this will create a medium image of this size.
Then there is a field with no unit indicated. It doesn't say kb or pixels. The English is a bit unclear. I assumed since the first line mentions height and width that it's about pixels. I have 900 in there.
March 14th, 2013, 07:55 AM
Sunny that is not how photo resizing works.
I am talking about these settings
Max allowable image width in pixels
Max allowable image height in pixels
Photos are resized when the max dimensions pass a threshold. You are never going to know how big a photos is going to be after it is resized all depends on how much it can be compressed the quality level etc. Resizing is based off dimensions.
The filesize limit you are getting hung up on means that a user can not under any circumstance upload a file larger than whatever size you put. So if you put 250 that means your users can not upload a file larger than 250kb.
what processor are you using? I need alot more info than it fails. What does it fails mean? what message do you get?
March 14th, 2013, 03:55 PM
OK. Thanks Chuck. We are using Image Magick. When I say it fails, I mean that I don't get any message at all. It loads my member galleries page without any new photo being in there. I am assuming that's what happens if the photo upload isn't successful. It doesn't give the upload details page where you add extra categories etc first. It just goes straight to the member gallery page.
We set the maximum file size to 200 to limit the disk usage on the server but it does prove to be problematic when users have to resize their pictures prior to upload. I was hoping that there was a resize option that would do it for them. If this is not possible perhaps we have to reconsider that filesize restriction. As we have almost 70,000 photos in there disc usage does add up over time.
March 14th, 2013, 04:52 PM
I would suggest you set things more normal.
1. Set the diskspace option that each member can have that will restrict overall how much space a user can upload overall.
2. Like I said the maximum dimensions is what is used to resize an image. Thus if you have 900x900 as the maximum sized image on your site then the height or width of that image has to be 900 to be resized down thats fine. I use 1200 myself
Remember that if your uploading a file over 2mb and your servers PHP has a maximum upload filesize of 2mb then the server drops the file before it gets to photopost to process. This explains your issue. Try altering your php to allow larger filesizes. Your host should be able to help with that.
March 15th, 2013, 04:37 PM
Thanks for the advice Chuck. I've now changed the file height and width limits.
You were absolutely right about the php restriction. That was it. Many thanks again!
March 15th, 2013, 07:35 PM
glad to help let me know if you have any other questions ;)
May 7th, 2013, 03:49 AM
I need to look at this again.
I am getting a lot of complaints from members and quite a few are moving over to flickr, photobucket etc because they don't find the gallery very usable. On those sites they can just browse to their pictures and upload no matter what size they are. They don't need to use any resizer. The code they then get will display a medium sized picture on the forum. I need to know if I can duplicate that.
At the moment my max width and height are both 900kb and my max filesize for upload in the usergroups is 2000kb. I got a file off my camera without editing it and it was 1.2 megabytes. When I tried to upload that file I got an error saying that it was too wide.
Can you recommend any settings that would possibly work, bearing in mine that the bbcode will be used in forum posts so we don't want the pic to be too big on the page?
May 7th, 2013, 08:20 AM
Make sure under upload options you elect to resize images. ;)
Your issues are you keep changting settings without understanding the ramifications of your actions. We have discussed the settings before.
Let's think this through here. If you set a diskspace or filesize setting that means the max amoung of space or filesize must be under to allow uploading.
If you set max size restrictions which is normal and then elect to NOT resize an image down to those settings then your telling the program to stop and give that message saying the photo is too wide or too tall etc.
This is pretty straight forward here. You elect to not resize an image down your going to turn your people away.
May 7th, 2013, 03:07 PM
Thanks. I'm slow, but I'm getting there. ;)
May 7th, 2013, 03:28 PM
yeah easy error to respond to its kinda of an absolute error. ;)
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.