WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#21961 closed enhancement (duplicate)

disable 2 times crop for super-faster upload

Reported by: alexvorn2 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Upload Keywords:
Focuses: Cc:
PR Number:

Description

when you upload an image to the media, the images is uploaded, then converted to 3 different images...

  1. 150x150 px
  2. 300x274 px
  3. 1024x936 px (in my theme example)

It can be faster upload if we will remove the action to resize/crop to all these images.

We can resize only to 150x150 px for thumbnail, and after the user uses from the selection menu what images he would like to insert into the post, create the images to this needs... like 300x274 (middle size)...

Change History (6)

#1 follow-up: @SergeyBiryukov
7 years ago

Related: #15311

#2 in reply to: ↑ 1 @alexvorn2
7 years ago

Replying to SergeyBiryukov:

Related: #15311

it is not a duplicate I think... but is related :)
I use that code and can say that is really buggy...

#3 follow-up: @scribu
7 years ago

  • Type changed from defect (bug) to enhancement

Here's one scenario where having intermediate image sizes generated "on the fly" would be bad:

Say you have a moderately busy homepage (tens of hits per second), where you display a 'medium' image for each recent post. You upload a large image for a post and publish the post.

The first user hits the home page; the 'medium' image for the new post isn't there, so WP sets out to generate it.

Assuming it takes 2-3 seconds to do that, there will already be tens of other WP instances trying to generate the same image.

Server runs out of memory and starts refusing connections or just dies.

#4 in reply to: ↑ 3 @alexvorn2
7 years ago

Replying to scribu:

Here's one scenario where having intermediate image sizes generated "on the fly" would be bad:

Say you have a moderately busy homepage (tens of hits per second), where you display a 'medium' image for each recent post. You upload a large image for a post and publish the post.

The first user hits the home page; the 'medium' image for the new post isn't there, so WP sets out to generate it.

Assuming it takes 2-3 seconds to do that, there will already be tens of other WP instances trying to generate the same image.

Server runs out of memory and starts refusing connections or just dies.

Good catch! I will try to find a solution...

#5 @alexvorn2
7 years ago

maybe to try to resize/crop all images on the fly before publishing the post?
Huh! I am a genius ))))

#6 @ocean90
7 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 3.4.2 deleted

The discussion should be concentrated in #15311.

Replying to alexvorn2:

maybe to try to resize/crop all images on the fly before publishing the post?
Huh! I am a genius ))))

Not really. You would have a faster upload, but a slower publishing.

Note: See TracTickets for help on using tickets.