Opened 11 years ago
Closed 11 years ago
#25490 closed defect (bug) (duplicate)
Issue with large images in Media Libray
Reported by: | wpweaver | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6.1 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
Images in the media library are apparently limited to a maximum of 8192px width/height. This manifests as a PHP problem when using:
$metadata = wp_get_attachment_metadata();
$w = $metadata [ 'width' ];
$h = $metadata[ 'height' ];
as used by many themes (including Twenty Thirteen at least) to display Attachment pages. The resulting run-time errors (using twenty-thirteen):
Warning: Illegal string offset 'width' in /wp-content/themes/twentythirteen/image.php on line 40
Warning: Illegal string offset 'height' in /wp-content/themes/twentythirteen/image.php on line 41
This was with a 9,000px wide .jpg image (which loaded into the media library okay, but stopped with a "crunching" message on the upload page). The errors went away when the image was reduced to 8192px, so I'm assuming there is a limit of 8192 somewhere.
This manifests in 3.6.1, but I'd assume it is in 3.7 beta as well.
Change History (4)
#2
@
11 years ago
I don't think it's arbitrarily limited like that - this sounds like memory ran out before attachment metadata was generated and saved.
Sorry - follow up:
Ideally the fix would allow large images (it was discovered by a user of my theme who was uploading high quality artistic images suitable for large size printing), but I think at least a warning of the limit is important.