[wp-trac] [WordPress Trac] #48209: Original file name changes on images upload and extra unregistered image sizes generated
WordPress Trac
noreply at wordpress.org
Thu Jan 9 05:38:26 UTC 2020
#48209: Original file name changes on images upload and extra unregistered image
sizes generated
--------------------------+-----------------------
Reporter: Iulia Cazan | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Media | Version: 5.3
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Changes (by bbtodd):
* status: closed => reopened
* resolution: worksforme =>
Comment:
Replying to [comment:4 desrosj]:
> The `2048x2048` and `1536x1536` are new sizes introduced in [46066] in
an effort to enhance the way WordPress displays images on the front-end on
larger, high-density devices. They make it possible to generate more
suitable `srcset` and `sizes` attributes, and not use the original, often
non-optimized image.
>
> These new sizes will be generated for all newly uploaded images going
forward.
>
> I am seeing the original image in the meta data that you supplied in the
`original_image` index, so it seems to be working as intended.
>
> - The original image is larger than the new big image threshold used to
cap images at an upper size limit.
> - The original is scaled down to be more useful using the two new image
sizes.
> - The original is preserved in the attachment's meta data.
>
> If you wish to disable this big image threshold (or tweak it to your
liking), you can use the `big_image_size_threshold` filter to return a new
size. Returning `false` will disable this.
>
> I'm goign to close this out because it appears to be working as
intended. If I am misinterpreting the questions, or you have more, feel
free to reopen to discuss more.
Hi, Did I misunderstand? You say returning false will disable this. I
tried using this code and it has no effect.
{{{
add_filter( 'big_image_size_threshold', '__return_false' );
}}}
Serious issue for me, I'm allowing users to upload images but have been
overwriting the full size uploads with thumbnails. For legal reasons I
don't want to allow large images of user uploads just in case of copyright
issues. And I just now noticed multiple unregistered very large images are
being stored on my server! I must disable these sizes.
I see these being created -2048x2048.jpeg, -1536x1536.jpeg plus I've also
seen some files appended with -scaled.jpeg - I need all of these removed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48209#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list