Avatar Plugin, Fails to work with large files

When I use a large file (2816 by 2112), the image will upload, allow me to move around and adjust the crop box but when I hit the "crop" button the the page goes blank. I still have my side bar and everything but the body of the page is just gray.

I know it’s not loading or anything because the bottom of my browser says "Done" which means the page has full loaded.

How can I fix this problem. Many users will be using large photos from their cameras.

  • Andrew
    • Champion of Loops

    Users just need to use smaller files. We’re going to be updating the plugin to toss back an error if the image is over a certain size.

    The huge images generated by camers should never be uploaded to the web unless your uploading them for people to download or uploading them to a photo site for processing, etc. They’re just not "web friendly".

    Thanks,

    Andrew

  • drmike
    • DEV MAN’s Mascot

    It can actually be a couple of different issues. Anything from server settings to wordpress.

    Let’s start out with checking your webserver’s error logs please. Also need to know the specific file size in kbytes or megs, what you have upload_max_filesize set to in your php.ini file, and what you have wpmu set for allowed space.

    For reference, you might want to skim this:

    http://kevinbriody.net/2008/07/05/wordpress-amateur-hour-enabling-large-file-uploads-with-upload_max_filesize/

    To be honest though, it;s an educational issue for you and your clients and it’s going have to be addressed unless you’re giving each client gigs of upload space. I know over on edublogs, they allow 20 megs up upload space on their free blogs. That’s 15 pictures if you’re lucky. That’s also a 20 minute download for someone on dial up. Explaining why that is a bad idea via a site FAQ and even blogging about it is a must. A tutorial on the use of MSPaint may even be a good idea. (Everyone has MSPaint except for those pesky Mac users but they don’t know better. :wink:

  • jondperry
    • WPMU DEV Initiate

    The photo is 2.7mb but that should not be a problem on my server or my wp install

    I allow each user 1gb of space for the basic package and 10gb for the pro package (They are creating full websites not just blogs) and I have everything set to upload a file that is up to 80mb. I’ve tested it with a 70mb mp3 file and it all works. I assume this problem is a problem with the plugin, not my upload settings.

    Does this plugin create a new small image from the original image or does it just show the original image at a smaller size?

    I guess what I need is a plugin that allows people to actually shrink there images and convert them to 72dpi. Is there such a plugin? Ideally I’d like users to be able to do everything online with no photo editing software needed on their computers.

  • drmike
    • DEV MAN’s Mascot

    Creates a small image. 4 of them I believe.

    Still would be a plus to check the webserver’s error logs. Folks have had issues with the imaging software previously and not all servers have GD or the like installed as a default.

    For a while, the wordpress software was rejecting anything over a meg in size uploaded as an image.(Or was it not creating a thumbnail. I forget which.) Not sure if that’s still in the code. Haven’t heard anyone complain about it lately and the "feature"’s not promoted that much. It was a restriction placed by the developers as the GD developers were having issues with handling larger images and also in consideration of processor usage. This may be what’s coming into play here.

    Reference: http://mu.wordpress.org/forums/topic/3158

    edit: Maybe a good idea to pass an upload through wp_create_thumbnail but at a larger size? Say 500?

    reedit: Actually wp_constrain_dimensions() maybe a better idea.

    http://trac.mu.wordpress.org/browser/branches/2.7/wp-includes/media.php#L228

  • Aaron
    • Ex Staff

    You can try increasing the memory_limit in php.ini. My experience if you can pop it up to 64MB or 128MB.

    The error has to do with how many pixels are in the image, not the filesize. When image_create_fromjpg php function loads it for resizing it converts it to a bitmap, which takes a ton of memory!

  • jondperry
    • WPMU DEV Initiate

    I’ve played around with my php.ini settings and it still wont work.

    I guess that in order for this plugin to function properly, there would need to be an automatic image resize on upload that get the image to an appropriate size like 600 by 400. Then it would take you to the crop tool and let you do your thing.

    Unfortunately I’m not a good programmer so I wouldn’t really know how that’s done. All I know how to do is complain when things don’t work how I think they should :slight_smile:

    By the way, these plugins you guys have created are amazing.

  • jondperry
    • WPMU DEV Initiate

    There’s also no error message on the screen directly after trying to crop. It’s just a gray screen with my wp-admin header footer and sidebar.

    It goes immediately to that screen like it doesn’t even try to crop the image.

    Worse comes to worse I’ll just tell my users only to use photos that are web size. I think most of them can handle that. I’m just worried about the people who know nothing about digital images, it’s just one more thing for them to learn and worry about.