Default Image doesn't display in customizer preview
-
I’ve added support for a custom header in my new theme and it basically works fine, however I’ve run into minor irritation in that the customizer isn’t displaying the default image in the theme preview, instead it shows a broken image.
I have the default image in a directory
./img/headbg/desk.jpg
and have set up the call to add theme support for custom headers like so:'default-image' => get_template_directory_uri() . '/img/headbg/desk.jpg'
When I inspect the element in Chrome Dev Tools I can see it’s trying to use the link
https://img/headbg/desk.jpg
instead of the full template path like it should be.I’ve tried both
get_template_directory_uri()
andget_template_directory()
with the same result. I also tried%s/img/headbg/desk.jpg
just for grins and giggles… at this point I’m stuck and Google has failed me so here I am. It’s kind of a minor annoyance because it works perfectly fine once you select an image and save it, but it’s going to bug me until I fix it.
- The topic ‘Default Image doesn't display in customizer preview’ is closed to new replies.