1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Wordpress image uploading problem - out of memory

Discussion in 'WordPress' started by jasoncdu, Sep 29, 2011.

  1. #1
    Hey everyone,

    I was just wondering why everytime I use the default image uploader, that I can't upload pictures larger than 3500px by 2900px. It will say that the uploading took 69MB of memory (while my limit for the server is 64MB)

    Is wordpress supposed to take so much memory just for a simple image crunching?? I thought 64MB would be sufficient ..

    Is there anyone that is able to fix this??

    Error:

    Fatal error: Out of memory (allocated 69206016) (tried to allocate 3872 bytes) in /home/isc/public_html/wp-content/plugins/a2z-photo-gallery/a2z-photo-gallery.php on line 34

    **PS: using the default media / insert image produces same results .. so it's not plugin exclusive.

    Thanks,
    Jason
     
    jasoncdu, Sep 29, 2011 IP
  2. samie

    samie Member

    Messages:
    269
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #2
    Well, I guess it's understandable that more memory would be used up if there's larger images to be processed. However 64MB would usually be enough. I would think it would have something to do with the plugin though. If you use the "insert image", does it also make reference to 'a2z-photo-gallery' in the error message? Anyways, either way it's an easy fix. Just go into your php.ini file and modify the "memory_limit = 64mb;" to something like "memory_limit = 120mb;".
     
    samie, Oct 1, 2011 IP
  3. jasoncdu

    jasoncdu Active Member

    Messages:
    569
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hi samie, thanks for your reply.

    This is not limited to the 'a2z-photo-gallery' script. If I try uploading a normal image through Media, or uploading by inserting image into posts it displays the same message.

    There is something wrong with my wordpress?

    As well I cannot change the memory limit = 120mb because my hosting provider (hostgator) only allows maximum of 64MB of memory.

    Any ideas?

    Uploading via default media
    Thanks,
    Jason
     
    jasoncdu, Oct 2, 2011 IP
  4. Internet Marketing IQ

    Internet Marketing IQ Guest

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #4
    That is a gigantic photo size. What is the purpose? Most people still browse at 1024x768. Photos that large will take forever to view, so they will likely time out for most people.

    Down size them.

    If you need them for some kind of photo site make the files available as zips.

    You can always create a folder and ftp them direct.
     
    Internet Marketing IQ, Oct 3, 2011 IP
  5. samie

    samie Member

    Messages:
    269
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #5
    I'd just switch Web Hosts lol But yeah Jason is right in that the images you are uploading are incredibly huge anyways. It would be best to scale them down. But I have been doing some research and seen people having similar issues (using the default media upload option) and when they disabled some plugins (that weren't even related to the pictures), it started working properly. Aside from that I'm not really sure what you could try. I mean, aside from some type of plugin, I don't think Wordpress itself could be having an issue unless you were updating the default files. So it must have something to do with the plugins. Otherwise if you were updating some of the default wordpress files then probably try temporarily replacing them with a default copy of the file. Especially if you were modiying the media.php file haha!

    Anyways, sorry if I'm not being too helpful with this :p Damn you hostgator!

     
    samie, Oct 3, 2011 IP
  6. jasoncdu

    jasoncdu Active Member

    Messages:
    569
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Thanks guys,

    I realize that it would be best to size photos down, but this site was built for people not so "tech savvy" and they expect to be able to just upload photos. If it were me I would resize it but sometimes it's not possible to tell your clients to go through that one extra step when they expect everything to just work.

    I will try disabling some plugins and see if that works

    Will let you guys know

    Thanks!
    Jason
     
    jasoncdu, Oct 6, 2011 IP
  7. bvraghav

    bvraghav Member

    Messages:
    123
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    33
    #7
    The thread is quite interesting. First of all, 69MB is just too large a size of an image to upload. Is it a tiff, or transparent png?? Resizing, as you had already acknowledged, is the best you can do.

    Then of course, you would have an image resizer, to optimize the filesize of your page, when requested, something like this plugin or one amongst this list.

    Further, IMHO, it would be logically better to issue a warning against extra-large file uploads on the client side. I dont know how practically feasible it is! But, trust me 64M is large even from print quality standards.
     
    bvraghav, Oct 7, 2011 IP
  8. dickieknee

    dickieknee Active Member

    Messages:
    441
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #8
    hi mate

    you need to change the memory limit of wordpress
    the file that needs editing is config.php

    add the line
    define('WP_MEMORY_LIMIT', '64M');

    that should fix the problem

    and also as every one else has suggested reduce the size of your image

    cheers
     
    dickieknee, Oct 9, 2011 IP