Use CDN for Custom Header Image
April 10, 2012 at 3:18 pm #4192
Hi. Is it possible to use a CDN hosted custom header image? I was able to use the CDN for the social icons by placing the CDN url in the field, however this is not an option for the setting the URL for the header image. Thanks.ModApril 10, 2012 at 10:31 pm #27549
placing the CDN url in the field
This is hotlinking. You shouldn’t do this because you are, in effect, stealing bandwidth.
Instead, download the images to your computer, upload them to your own site’s media gallery and link to them from their (for the social sharing icons), or upload them to the header options.
This is from Graphene’s “Top Bar Options” pane:
Please do not hotlink the icons on the site. Download the icons you need and upload them to your server instead.April 10, 2012 at 11:33 pm #27550
Uh, I am not hotlinking anything. I pay for the CDN. Since my header is a little on the large side, even after smush.it, I want it to come from “my” CDN rather than my slow shared hosted server. Hence the entire point of a CDN.ModApril 11, 2012 at 12:22 am #27551
That’s something different then. My bad. (I really must Google more. 😉 )
You can probably override the header image in a child theme CSS, but you have have to add the
Curious…why not get a faster host?
AnonymousApril 11, 2012 at 5:33 am #27552
Not recommended, but try this,
In header.php change,
<div id="header" style="background-image:url(<?php echo $header_img; ?>);">
<div id="header" style="background-image:url('http://image_path');">
image_pathwith the URL of your image hosted in a CDN server.April 11, 2012 at 7:49 am #27553
I’ve tried to do that. I copied a copy of header.php over to my child theme, and made the changes mentioned above. Cleared all caches. It is still coming from local server. Should I <restore original header image> in header settings? Maybe not use the child theme header file?April 11, 2012 at 7:52 am #27554
Nevermind. Seems to be working now. Thank you for your assistance.
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.