Title: upload | Make WordPress Core

---

#  Tag Archives: upload

 [  ](https://profiles.wordpress.org/azaozz/) [Andrew Ozz](https://profiles.wordpress.org/azaozz/)
8:24 pm _on_ October 11, 2019     
Tags: [5.3 ( 80 )](https://make.wordpress.org/core/tag/5-3/),
[dev-notes ( 654 )](https://make.wordpress.org/core/tag/dev-notes/), [media ( 93 )](https://make.wordpress.org/core/tag/media/),
upload   

# 󠀁[Updates to Image Processing in WordPress 5.3](https://make.wordpress.org/core/2019/10/11/updates-to-image-processing-in-wordpress-5-3/)󠁿

WordPress 5.3 includes several enhancements to how images are used and post-processed
after upload.

When an image is uploaded to WordPress, alternate smaller sizes are automatically
created. Some of these “intermediate” sizes are defined by coreCore Core is the 
set of software required to run WordPress. The Core Development Team builds WordPress.,
and others by themes or plugins. These are used both for art direction uses, like
alternate crops, and automatically by core for responsive images if they are the
same aspect ratio.

Resizing images is very resource intensive. As average image sizes have increased
over time, this has only increased the chances that requests may time out or run
out of memory. WordPress 5.3 includes several enhancements to help more uploads 
succeed, and to aid users in recovery when they do not. These changes also enable
WordPress to generate two new, higher resolution default sizes, to help user images
look their best.

## Saving of image metadata while creating intermediate sizes

Before 5.3, WordPress would first generate all intermediate sizes before saving 
proof of their existence in the database in metaMeta Meta is a term that refers 
to the inside workings of a group. For us, this is the team that works on internal
WordPress sites like WordCamp Central and Make WordPress..

This meant that if an upload failed in the middle, there could be many sizes that
had completed successfully stored, but this wouldn’t be reflected in the database.
A user’s only recourse was to re-upload over and over again in the hope that their
server was less busy and all of the sizes would be generated.

In 5.3, this problem is fixed through saving metadata for each size as it is created
in the database. This means more database writes, but allows WordPress to use the
sizes generated earlier, and to resume failed uploads.

To make this possible, a new method `make_subsize()` was introduced in the `WP_Image_Editor_GD`
and `WP_Image_Editor_Imagick` classes. It returns the new sub-size image path and
dimensions ready to be added to the image meta’s `sizes` array. See [#40439](https://core.trac.wordpress.org/ticket/40439).

Additional changes:

 * Introduces `wp_get_missing_image_subsizes()` and `wp_update_image_subsizes()`
   to generate image sub-sizes that are missing or were not created after the upload.
 * Adds a way to display errors that happened while creating sub-sizes.
 * Introduces `wp_create_image_subsizes()` intended for use after an image was uploaded.
   It saves/updates the image metadata immediately after each sub-size is created.

With that in place it became possible to attempt to finish post-processing of images
after upload if the server runs out of resources while creating intermediate image
sizes (the dreaded “HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol.
HTTP is the underlying protocol used by the World Wide Web and this protocol defines
how messages are formatted and transmitted, and what actions Web servers and browsers
should take in response to various commands. Error” message). See [#47872](https://core.trac.wordpress.org/ticket/47872).

## “BIG image” enhancements

Until now it was possible to use the originally uploaded images on the front-end
even when they are were not “web ready”. In WordPress 5.3 when a large image is 
uploaded it is stored in the uploads directory but is not used on the web site. 
A new scaled down image is created and used as the largest available size. This 
scaled down image is usually much more suitable for web use, the file size is up
to ten times smaller than the original. See [#47873](https://core.trac.wordpress.org/ticket/47873).

Additional changes:

 * Introduces `wp_get_original_image_path()` that retrieves the path to the originally
   uploaded image in all cases.
 * Introduces `big_image_size_threshold` filterFilter Filters are one of the two
   types of Hooks [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
   They provide a way for functions to modify data of other functions. They are 
   the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
   manner, and should never have side effects such as affecting global variables
   and output. to set the pixel value above which images will be scaled. The same
   value is used as `max-width` and `max-height` when scaling the original.

These enhancements also made it possible to automatically rotate uploaded photos
according to the EXIF data, and to add two additional default image sizes to better
support high-density displays. See [#14459](https://core.trac.wordpress.org/ticket/14459)
and [#43524](https://core.trac.wordpress.org/ticket/43524).

Thanks [@mikeschroder](https://profiles.wordpress.org/mikeschroder/) for helping
to write this post.

[#5-3](https://make.wordpress.org/core/tag/5-3/), [#dev-notes](https://make.wordpress.org/core/tag/dev-notes/),
[#media](https://make.wordpress.org/core/tag/media/), [#upload](https://make.wordpress.org/core/tag/upload/)

 [  ](https://profiles.wordpress.org/azaozz/) [Andrew Ozz](https://profiles.wordpress.org/azaozz/)
11:08 pm _on_ May 15, 2019     
Tags: [media ( 93 )](https://make.wordpress.org/core/tag/media/),
upload   

# 󠀁[Improve processing of uploaded images](https://make.wordpress.org/core/2019/05/15/improve-processing-of-uploaded-images/)󠁿

 As mentioned in [dev chat on May 15](https://make.wordpress.org/core/2019/05/15/dev-chat-summary-15-may/)
there are quite a few “stalled” tickets on TracTrac An open source project by Edgewall
Software that serves as a bug tracker and project management tool for WordPress.
dealing with image processing/resizing after uploading:

 * [Async media crunching](https://core.trac.wordpress.org/ticket/6814) [#6814](https://core.trac.wordpress.org/ticket/6814).
 * [Use exif rotation data when uploading pictures](https://core.trac.wordpress.org/ticket/7042)
   [#7042](https://core.trac.wordpress.org/ticket/7042).
 * [Rotate Full Size Images on Upload](https://core.trac.wordpress.org/ticket/14459)
   [#14459](https://core.trac.wordpress.org/ticket/14459).
 * [Retroactively generate new images sizes if requested](https://core.trac.wordpress.org/ticket/21295)
   [#21295](https://core.trac.wordpress.org/ticket/21295).
 * [Improve intermediate image size handling](https://core.trac.wordpress.org/ticket/21810)
   [#21810](https://core.trac.wordpress.org/ticket/21810).
 * [Uploading Media does not show an error when connection is interrupted](https://core.trac.wordpress.org/ticket/22146)
   [#22146](https://core.trac.wordpress.org/ticket/22146).
 * [Media Upload hangs on Crunching on too big image sizes](https://core.trac.wordpress.org/ticket/23127)
   [#23127](https://core.trac.wordpress.org/ticket/23127).
 * [Memory exhaustion caused by very many unattached media](https://core.trac.wordpress.org/ticket/24688)
   [#24688](https://core.trac.wordpress.org/ticket/24688).
 * [Media Upload Issue Since 4.5 Upgrade](https://core.trac.wordpress.org/ticket/36534)
   [#36534](https://core.trac.wordpress.org/ticket/36534).
 * [Optimize full size images](https://core.trac.wordpress.org/ticket/37840) [#37840](https://core.trac.wordpress.org/ticket/37840).
 * [Make media upload “HTTP error.” more user-helpful](https://core.trac.wordpress.org/ticket/39647)
   [#39647](https://core.trac.wordpress.org/ticket/39647).
 * [Add another default image size](https://core.trac.wordpress.org/ticket/43524)
   [#43524](https://core.trac.wordpress.org/ticket/43524).
 * [Image upload failures when using Gutenberg gallery block](https://core.trac.wordpress.org/ticket/46309)
   [#46309](https://core.trac.wordpress.org/ticket/46309).

All of these, and more, can be “unblocked” by: [Save progress of intermediate image creation after upload](https://core.trac.wordpress.org/ticket/40439)
[#40439](https://core.trac.wordpress.org/ticket/40439).

Fixing this will also enable “refreshing” of the way we do responsive images, and
will enable improvements in how we generally work with images in the blockBlock 
Block is the abstract term used to describe units of markup that, composed together,
form the content or layout of a webpage using the WordPress editor. The idea combines
concepts of what in the past may have achieved with shortcodes, custom HTML, and
embed discovery into a single consistent API and user experience. editor. Then we
will be able to enhance the Image block and make it “just work” regardless of the
context, see [Enhancement: images handling](https://github.com/WordPress/gutenberg/issues/6177)
and more importantly https://github.com/WordPress/gutenberg/issues/6177#issuecomment-
442953527.

In short: fixing the above tickets will greatly improve user experience especially
when uploading large images or the server is slow/busy. It will also open the way
for enhancing how we work with images in the editor, and let us show better fitting
images on the front-end.

[#media](https://make.wordpress.org/core/tag/media/), [#upload](https://make.wordpress.org/core/tag/upload/)

 [  ](https://profiles.wordpress.org/ryan/) [Ryan Boren](https://profiles.wordpress.org/ryan/)
8:36 pm _on_ July 11, 2008     
Tags: flash, upload   

# 󠀁[If the Flash uploader isn’t working for …](https://make.wordpress.org/core/2008/07/11/if-the-flash-uploader-isnt-working-for/)󠁿

If the Flash uploader isn’t working for you, you can now select a regular browser
uploader.

[#flash](https://make.wordpress.org/core/tag/flash/), [#upload](https://make.wordpress.org/core/tag/upload/)

 [  ](https://profiles.wordpress.org/ryan/) [Ryan Boren](https://profiles.wordpress.org/ryan/)
11:24 pm _on_ March 21, 2008     
Tags: [media ( 93 )](https://make.wordpress.org/core/tag/media/),
[plugins ( 33 )](https://make.wordpress.org/core/tag/plugins/), [TinyMCE ( 22 )](https://make.wordpress.org/core/tag/tinymce/),
upload   

# 󠀁[TinyMCE, media uploader, and plugin upda …](https://make.wordpress.org/core/2008/03/21/tinymce-media-uploader-and-plugin-upda/)󠁿

TinyMCE, media uploader, and pluginPlugin A plugin is a piece of software containing
a group of functions that can be added to a WordPress website. They can extend functionality
or add new features to your WordPress websites. WordPress plugins are written in
the PHP programming language and integrate seamlessly with WordPress. These can 
be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. updater fixes along with a slew 
of smaller bugbug A bug is an error or unexpected result. Performance improvements,
code optimization, and are considered enhancements, not defects. After feature freeze,
only bugs are dealt with, with regressions (adverse changes from the previous version)
being the highest priority. fixes.

[#media](https://make.wordpress.org/core/tag/media/), [#plugins](https://make.wordpress.org/core/tag/plugins/),
[#tinymce](https://make.wordpress.org/core/tag/tinymce/), [#upload](https://make.wordpress.org/core/tag/upload/)

 [  ](https://profiles.wordpress.org/ryan/) [Ryan Boren](https://profiles.wordpress.org/ryan/)
10:18 pm _on_ February 16, 2008     
Tags: [media ( 93 )](https://make.wordpress.org/core/tag/media/),
[UI ( 99 )](https://make.wordpress.org/core/tag/ui/), upload   

# 󠀁[A bunch of media upload updates from And …](https://make.wordpress.org/core/2008/02/16/a-bunch-of-media-upload-updates-from-and/)󠁿

A bunch of media upload updates from Andy just landed.

[#media](https://make.wordpress.org/core/tag/media/), [#ui](https://make.wordpress.org/core/tag/ui/),
[#upload](https://make.wordpress.org/core/tag/upload/)