[wp-trac] [WordPress Trac] #34609: Image URLs should be hostnameless and methodless by default

WordPress Trac noreply at wordpress.org
Sat Nov 7 01:42:06 UTC 2015


#34609: Image URLs should be hostnameless and methodless by default
-------------------------+------------------------------
 Reporter:  meta         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Embeds       |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by meta):

 I was thinking of relative URLs like page /foo/bar referring to ../../wp-
 content/04/2015/08/image.jpg -- which is obviously not a good idea.

 I just had to change the URL of an MU install, and it was a major pain.
 Having the absolute URL encoded in every piece of rich text can't be the
 best answer.

 What if images were inserted using a shortcode rather than raw HTML, and
 the shortcode generated the absolute URL at runtime? That way you'd still
 end up with absolute URLs in RSS feeds and e-mails, but it would be easy
 to change the base URL of the site without having to do a search and
 replace on every piece of content.

 (You could also make the shortcode generate retina-ready srcsets into the
 bargain.)

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


More information about the wp-trac mailing list