Opened 5 months ago

Last modified 5 months ago

#22986 new defect (bug)

WP uses header image's GUID as URL

Reported by: bersbers Owned by:
Priority: normal Milestone: Awaiting Review
Component: Themes Version:
Severity: normal Keywords: has-patch needs-testing
Cc: info@…

Description (last modified by SergeyBiryukov)

See summary. If I move my site (old domain becoming inaccessible), I cannot use my header images any more since
a) I am not allowed to change GUIDs.
b) GUIDs are used as URLs for header images:

http://core.trac.wordpress.org/browser/trunk/wp-includes/theme.php

1008        foreach ( (array) $headers as $header ) {
1009	                $url = esc_url_raw( $header->guid );

Attachments (1)

22986.patch (515 bytes) - added by toscho 5 months ago.
Use wp_get_attachment_image_src() for URL

Download all attachments as: .zip

Change History (5)

I am not sure, but it seems that event newly uploaded files receive a GUID that contains the OLD domain. This means I cannot even re-upload header images, I cannot use any header image after moving a WordPress site. Can this be true?
(Probably not true generally. It does however seem true when I simply re-select the old header images from the media library. So I really need to re-upload ALL header images after moving the site?)

Last edited 5 months ago by bersbers (previous) (diff)
  • Description modified (diff)
  • Cc info@… added

toscho5 months ago

Use wp_get_attachment_image_src() for URL

  • Keywords has-patch needs-testing added

Not sure about the size argument. Is there a registered size for header images I missed?

Note: See TracTickets for help on using tickets.