WordPress.org

Ready to get started?Download WordPress

Forums

Image Upload Problem in TwentyTwelve (5 posts)

  1. Creatrix
    Member
    Posted 10 months ago #

    When i try and upload any image that is big in dimensions (around 3500x2500) using the 'add media' button on a post or page i get an error message saying 'An error occurred in the upload. Please try again later'.

    The image does upload though as when I go to my media library it's there.

    I click 'view' and i can see the image along with these two error messages:

    Warning: Illegal string offset 'width' in /homepages/24/d470762834/htdocs/wp-content/themes/twentytwelve/image.php on line 30

    Warning: Illegal string offset 'height' in /homepages/24/d470762834/htdocs/wp-content/themes/twentytwelve/image.php on line 31

    I looked within image.php on those lines and found this:

    $metadata['width'], $metadata['height'],

    Not sure what to do next!?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    Try checking your site's error logs for a more specific error message. Your hosts should be able to help you in accessing your site's error logs. My guess is that you are running out of PHP memory when trying to process such large images.

  3. Creatrix
    Member
    Posted 10 months ago #

    Thanks!

  4. Creatrix
    Member
    Posted 10 months ago #

    I got in touch with my host and they said that the package I have with them supports 60MB PHP memory limit. Is that enough?

    Like I said before the images are around 3500x2500 and are only around 830kb in size. Files that are smaller in dimension and are bigger in size (i.e. 1.5mb) go up fine, which makes me think that is something to do with the dimensions (along with the illegal string offset width and height error messages I get) .

    Does wordpress have a min or max image dimension?

    Also, when I 'view' the image in the media library the dimensions are not shown like any of the others - not sure if that provides any clues?

    I've found all the logs but if i'm honest not really sure what i'm looking for. There is a mail.log, http://ftp.log, access.log and a few other random files? Do you know exactly what i'd be looking for?

  5. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    Is that enough?

    Possibly for normal site use - depending upon what theme and plugins you are running - but almost certainly not enough to process large images (image processing is very memory intensive).

    Does wordpress have a min or max image dimension?

    No - it does not impose any limits on image uploads.

    Do you know exactly what i'd be looking for?

    Try looking for memory related errors.

Reply

You must log in to post.

About this Topic