[wp-trac] [WordPress Trac] #32112: wp_get_attachment_url returns https when it should not

WordPress Trac noreply at wordpress.org
Fri Apr 24 14:55:25 UTC 2015


#32112: wp_get_attachment_url returns https when it should not
--------------------------+------------------------------
 Reporter:  zabatonni     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.2
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by zabatonni):

 * keywords:   => close


Comment:

 Replying to [comment:6 boonebgorges]:
 > > Yes, side effect is that it won't load at all due to ssl cert.
 >
 > Can you explain this in more detail? If https://site.tld/wp-admin/ is
 available, then `<img src="https://site.tld/uploads/2015/whatever.jpg" />`
 should work.
 >
 > > Wouldn't it be better to use all attachments schemeless?
 >
 > Yeah, we considered this, but it's hard to do it at the level of
 `wp_get_attachment_src()`. That function may be used to generate URLs used
 in emails, RSS feeds, and other places where clients may not understand
 schemeless URLs.

 Ok, I get it. Lets close this. For now I'll be using filter to have those
 links back to http.

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


More information about the wp-trac mailing list