I'm wondering what the best practice is for storing images, css, js etc in my file manager. I've come up with these 2 possible options as my preferred options.
- Create folders (
images/
,css/
,js/
) in the root directory
And refer to these files like <img src="/images/image1.png">
for example...
OR
- Create folders (
images/
,css/
,js/
) in the specific theme directory
And refer to these files like <img src="<?php bloginfo('template_directory'); ?>/images/image1.png">
for example...
I'm wondering if there is a standard or a preferred practice? I'm new to wordpress and php and would like to start off doing things correctly now, rather than trying to fix problems in the future.
Thanks!