• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Can't upload large images as attachments

#1
I have a travel site where my users are able to write about their travels in the forum. They are able to upload attachments so they can show images from their trip, but if they provide a large image it doesn't seem to upload. I have provided a generous attachment upload size, and my hosting company has upgraded the php upload size.

The images seem to upload to a 100%, but then nothing happens. It doesnt show a image next to the uploading bar. Look at my attached image. Any suggestion on what to do?
 

Attachments

#3
The size are between 2-3 mb and they are around 3000px x 2000px.

I took em down to 750 x 1000 px and that worked fine. But not all my users have the time to resize all images they try to upload.
 
#5
You mean these variables? Is it my hosting who fix this?:

PHP:
max_execution_time
memory_limit
post_max_size
upload_max_filesize

MySQL:
max_allowed_packet
max_packet_size
wait_timeout
 

Brogan

XenForo moderator
Staff member
#6
If you don't have access to php.ini or the sql configuration file, then yes, you will need to speak to your host.
 
#7
Ok! You have any idea on which of these variables that needs to be bigger. Let's say I want to upload a image taken with my digital camera, 4 mb big and 3000 x 4000.

Thanks for the great support!
 

Brogan

XenForo moderator
Staff member
#8
If you are on an Apache server, you can try adding this to your .htaccess file:

Code:
php_value upload_max_filesize 10M
php_value post_max_size 10M
Change the values to suit.

If that doesn't work, you will need to ask your host to increase the limits, starting with those two variables.
 
#9
Seems to go fine uploading large images now.. for the most time. But one problem is still there.. the thumbnail doesnt show on large images?

It's no problem to upload it on this forum and the thumbnail works fine.. hmm. I have no addons or something that could disturb
 

Digital Doctor

Well-known member
#10
TEST -

949K or 1,047 K
1370 x 1214
PNG
appletv-vs-appletv-set-png-4x.png
seemed to thumbnail OK.


TEST 2 -
1,313 K or 1.25 MB
1370 x 1703
appletv-vs-appletv-set-png-5x.png

TEST 3 -
1,685 K or 1.60 MB
1370 x 2313
appletv-vs-appletv-set-png-6x.png
TEST 4 -
2,031 K or 1.93 MB
1370 x 2839
appletv-vs-appletv-set-png-7x.png
 

Attachments

Kuma

Active member
#11
As Mike suggested in the other thread, most Bulletin Board software have this problem. The reason really large images cannot always be thumb-nailed is the required memory for the php script would cause the script to die, and then php doesn't get a thumbnail.

You need to allow PHP a large amount of memory; if you are going to be working with large photos 64-128mb would be ideal.
 

Digital Doctor

Well-known member
#13
Does anyone know the thresholds ?

Interesting .... my uploaded files are being resized ?

different.sizes.between.computer.and.attached.in.xenforo.jpg

Note the 1.2 MB file (called 5x) is the biggest as an attachment.
After that ... the uploaded file size increases .. but the actual attached image sizes get smaller.

I wonder if this is related to my images being taller than wider ?
 

Brogan

XenForo moderator
Staff member
#14
Interesting .... my uploaded files are being resized ?
ACP setting.

Why can't I upload an image, even though it is smaller than the maximum dimensions (pixels) permitted?
Server-side file size (KB) resizing is not supported. Any files which are larger than the maximum size specified in the ACP -> Options -> Attachments: Maximum Attachment File Size (KB) will be rejected.


Why can I upload an image, even though it is larger than the maximum file size (KB) permitted?
Uploaded files are first resized based on the maximum physical dimensions (pixels) set in the ACP -> Options -> Attachments: Maximum Attachment Image Dimensions. If the resized image is below the maximum file size (KB) limit, then it will be allowed.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180445