WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#31120 closed defect (bug) (worksforme)

Upload bug: Square pictures bigger than 2500px

Reported by: wpstkw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Media Keywords:
Focuses: Cc:

Description

Hi!

The bug happens only with quare pictures (jpg in my case) bigger than 2500pixels. The upload stops at 100% and there are no thumbnails for this picture.

Maybe a "Out of memory" bug but without error message if the first picture works.

If I upload only one of this pictures I get an Out of memory (allocated 67633152) (tried to allocate 4096 bytes) in /.../wp/wp-includes/media.php on line 2043 message.

post_max_size = 128M
upload_max_filesize = 128M
memory_limit = 256M
max_execution_time = 42

Attached you will find screenshots and a working and a not working picture.

regards
ST

Attachments (5)

upload-100-bug-1.jpg (33.7 KB) - added by wpstkw 7 years ago.
upload-100-bug-2.jpg (33.9 KB) - added by wpstkw 7 years ago.
upload-100-bug-3.jpg (63.1 KB) - added by wpstkw 7 years ago.
Works.jpg (936.6 KB) - added by wpstkw 7 years ago.
Works-not.jpg (1.4 MB) - added by wpstkw 7 years ago.

Change History (10)

@wpstkw
7 years ago

@wpstkw
7 years ago

#1 @wpstkw
7 years ago

Just for clarification. The bug happens not with not sqare pictures. Rectangle pictures i can upload in all sizes.

#2 @SergeyBiryukov
7 years ago

  • Component changed from Upload to Media

Related: #22869, #23127, #23363.

Out of memory (allocated 67633152) (tried to allocate 4096 bytes) in /.../wp/wp-includes/media.php on line 2043
...
upload_max_filesize = 128M

Apparently the upload_max_filesize setting has no effect on your install, 67633152 is 64M.

#3 @wpstkw
7 years ago

@Sergey: maybe, but for square pictures only. "Normal" Pictures I can upload with 12M and 3000x6000px and regarding the upload_max_filesize Info. It's out of phpinfo(). And why the uploader requires more than 64M for a 1.2M picture?

#4 @Fab1en
7 years ago

I think this bug is more related to the GD library that is not able to load the picture to generate the thumbnails.

When GD loads a jpeg image, it converts it into bitmap so only the original jpeg file resolution is taken into account in the number of bytes needed. The difference of treatment between square and rectangle images is a mystery though. And 3000x3000 image should not take up to 64M in memory, but only 34M if my computation is right (32 bits per pixel). Do you use any plugin that could make some post-treatment to uploaded images ? Or do you use another php library to manipulate images ?

I tried to upload your images on my local WordPress install with your PHP settings without issues.

#5 @wonderboymusic
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Feel free to reopen if there is a specific bug here, but this worked fine for me immediately

Note: See TracTickets for help on using tickets.