[wp-trac] [WordPress Trac] #61423: Issue with returned url on wp_get_attachment_image_src using FSE

WordPress Trac noreply at wordpress.org
Thu Jun 13 10:30:25 UTC 2024


#61423: Issue with returned url on wp_get_attachment_image_src using FSE
--------------------------+------------------------------
 Reporter:  n0th          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  6.5.4
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by mathieulamiotwpmedia):

 == Reproduction Report
 === Description
 The reported issue could not be reproduced.

 === Environment
 - WordPress: 6.5.4
 - PHP: 8.1.23
 - Server: nginx/1.16.0
 - Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
 - Browser: Chrome 125.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Three 1.4
 - MU Plugins: None activated
 - Plugins:
   * Code Snippets 3.6.5.1
   * Test Reports 1.1.0

 === Actual Results
 1.  Links retrieved from wp_get_attachment_image_url are valid, with the
 letter x, and not the multiplication sign.


 === Additional Notes
 - Tested with Code Snippet plugin, with the following snippet:

 {{{
 $imgid = 23;
 $imgurl = wp_get_attachment_image_url( $imgid, 'medium' );
 error_log('Test MLT: '. $imgurl);
 }}}
 It always returned URLs like:


 {{{
 [13-Jun-2024 10:29:00 UTC] Test MLT: http://wceu-2024-test.local/wp-
 content/uploads/2024/06/profil_picture_Vienne_2023-255x300.jpeg
 }}}


 - Tested with 'full','large','medium','small' image size as parameters.
 - Tested on themes: Twenty Twenty Four, Twenty Twenty Three, Twenty Twenty
 Two.
 - From the debug.log file, I copy/pasted the URL in a browser and got the
 picture displayed.

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


More information about the wp-trac mailing list