[wp-trac] [WordPress Trac] #55274: Special chars in attachment filename breaks srcset

WordPress Trac noreply at wordpress.org
Thu Sep 19 22:00:47 UTC 2024


#55274: Special chars in attachment filename breaks srcset
--------------------------+-----------------------------
 Reporter:  dravnic       |       Owner:  audrasjb
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:  4.4
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------------

Comment (by bozzmedia):

 Currently investigating an issue that may be related to this bug.  MacOS
 generated screenshots have auto generated filenames that include spaces,
 but not all are stripped out by WP core:

 Example file uploaded via media libary:
 https://redacted.com/wp-
 content/uploads/2022/09/Screenshot-2022-09-19-at-12.09.42%E2%80%AFPM.jpg

 It seems to miss that last space in there even though the original
 filename contains many spaces.

 {{{
 <meta property="og:image" content="https://redacted.com/wp-
 content/uploads/2022/09/Screenshot-2024-09-19-
 at-12.09.42 PM.jpg"/>
 }}}

 This renders as a meta tag, Facebook debugger reports:

 {{{
 Corrupted Image
 Provided og:image URL, https://redacted.com/wp-
 content/uploads/2022/09/Screenshot-2022-09-19-at-12.09.42 PM.jpg could not
 be processed as an image. It may be corrupted or may have an invalid
 format.
 }}}

 Potentially related thread:
 https://wordpress.org/support/topic/spaces-in-filenames-leads-to-unloaded-
 image-invalid-error/

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55274#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list