[wp-trac] [WordPress Trac] #48453: Regression: Implied contract between image sub-size filenames and their base filename now broken
WordPress Trac
noreply at wordpress.org
Tue Oct 29 08:14:40 UTC 2019
#48453: Regression: Implied contract between image sub-size filenames and their
base filename now broken
-------------------------------------+---------------------
Reporter: ianmjones | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: Media | Version: trunk
Severity: major | Resolution:
Keywords: needs-patch 2nd-opinion | Focuses:
-------------------------------------+---------------------
Comment (by Iulia Cazan):
Replying to [comment:2 slackbot]:
> ''This ticket was mentioned in [https://make.wordpress.org/chat/ Slack]
in #core by azaozz.
[https://wordpress.slack.com/archives/core/p1572303558428200 View the
logs].''
From my perspective, moving the "original" would only complicate things,
and that is because currently (in 5.3-RC2 also) there is no information
recorded in the database of it, no file path, no width/height, just
nothing, and we rely on the directory mentioned in the metadata for the
full size to identify it (or at least I could not find another way to do
this). It will just become a nightmare to delete it or just use it to
generate files as a failback when something went wrong with the full size.
From all my tests, the issue with the full-size naming happens only when
the threshold kicks in, and the sub-sizes are not generated from the new
full size generated, but from the original itself.
For example, this is quite odd for big files, let's say the uploaded file
is `image.jpeg` of 6MB, this is then generating with the new threshold
filter a full-size called `image-2560.jpeg` of 1MB (if the script does not
fail). The sub-sizes are then generated from the 6MB file, processing
which is again prone to script fails not to mention it will take a lot of
time.
Why aren't the sub-sizes generated from the new full-size which is smaller
and also the quality high enough as far as I could test?
Also, what is the point to keep the "original" when the threshold was
applied? As far as I understand the process `image-2560.jpeg` can be
easily renamed back after the real original file and the real original
removed (this is never used as far as I can see in the code). If the code
would to this switch, then I do not see a problem anymore for the naming
of the sub-sizes, and also, the sub-sizes will generate faster, from a
smaller file.
Did I get this right?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48453#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list