Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Cannot upload images with more than 4096px height

mikemetismikemetis New
edited September 2018 in Vanilla 2.0 - 2.8

I am a hobby photographer and I am using Vanilla Forums to discuss photos with some friends. The problem is that we are not able to upload the original jpg photos we shot. They normally have dimensions of 6720 x 4480px. I did several tests and problems start with a height higher than 4096px.

It does not matter if uploaded via Advanced Editor or FileUpload-plugin.

It is not the file size. Because I was able to upload 20MB files but not a photo with 6MB but a height of 4480px.

Can someone please tell me how to fix this?

Comments

  • without more details ....

    could be you are running out of memory if there is any image conversion (thumbnails, resizing ,etc).

    possibly increase php memory limits or disable any image conversion if it is memory issue.

    ini_set('memory_limit', '64M') or higher

    http://www.dotsamazing.com/en/labs/phpmemorylimit

    https://stackoverflow.com/questions/27474629/out-of-memory-although-memory-limit-is-large-enough

    depending imaging processing if gd you could test...

    you could try zipping up jpgs - not for compression sake, but for file type and try uploading.

    try the new editor that comes with 2.7

    https://open.vanillaforums.com/discussion/36603/vanilla-2-7-will-be-along-shortly

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Thank you @River, you helped me to solve it. Here is a short summary:

    Zipping a photo and uploading it already worked before. Given that, I am quite sure it has to do with the thumbnail generation.

    The memory_limit was at 128MB and I set it to 256MB after using the calculator you provided to me, stating 159MB are needed.

    But this did not solve it. I expect that other scripts need memory too or it is like stated in your second link that the GD needs more depending on the server it runs.

    I then set it to 512MB and it worked!

    Maybe the devs can consider Tom Robinson's advice at stackoverflow.com:

    "I gave up long ago on GD for scaling down large jpeg images, and use ImageMagick instead. If you execute it from within PHP, it is a separate process so the PHP memory limit no longer applies. Of course there is ultimately a memory limit, but you can tell ImageMagick the maximum memory to use.

    (I also got better-quality images than with GD.)"

    Thanks again @River !

  • gd is used for thumbnails you can reduce the thumbnail size.

    grep is your friend.

  • you have Garden.Thumbnail.SaveGif, Garden.Thumbnail.Size, Plugins.FileUpload.ThumbnailHeight, Plugins.FileUpload.ThumbnailWidth andGarden.Thumbnail.Width used in various places.

    grep is your friend.

  • Thank you @x00 . I am fine now. I like the standard garden settings in regards to the image thumbs. Their dimensions and positions look balanced and good. But I am still curious about 2.7...

Sign In or Register to comment.