I’d like to avoid using absolute URLs to link to images uploaded via the media library. I’m aware that in some cases I can use
<img src="<?php bloginfo ('template_url'); ?>/uploads/2011/11/sample.jpg"/>
<img src="<?php bloginfo ('stylesheet_url'); ?>/images/uploads/2011/11/sample.jpg"/>
…but it doesn’t always work when I’m using custom themes.
I’ve read over http://wordpress.org/support/topic/any-way-to-use-bloginfo-to-link-to-uploads-directory?replies=8 a few times, but it isn’t quite making sense to me and I’ve not been able to implement this successfully.
Can someone offer an alternate explanation?
- The topic ‘use bloginfo() to link to images from media library’ is closed to new replies.