You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's for creating this boiler plate, it looks really useful.
I have a question about where to put image files. I have background images in the scss and webpack handles them and they end up in the build/images folder, as expected. My question though is where should I put images that are referenced in an img tag in a php file, index.php for example? Should I create a separate static images folder for these outside my src/images folder, but that will mean two locations for images, or perhaps I could move my src/images folder up a level and keep all images in one folder?
I suppose at the end of the day I could do either but I'm wondering if I'm missing something or there is a preferred way?
Thanks
Bryan
The text was updated successfully, but these errors were encountered:
bryanwaddington
changed the title
Where to put image files reference in index.php
Where to put image files referenced in index.php
May 12, 2022
I don't think there's any problem with having two separate folders for images, as long as they don't have the same images duplicated in both. WordPress is pretty hands off in terms of how it does or doesn't want us to organize files. You can adjust your code in your PHP files to point towards the appropriate image case-by-case: <?php echo get_theme_file_uri('/images/library-hero.jpg') ?>
That's for creating this boiler plate, it looks really useful.
I have a question about where to put image files. I have background images in the scss and webpack handles them and they end up in the build/images folder, as expected. My question though is where should I put images that are referenced in an img tag in a php file, index.php for example? Should I create a separate static images folder for these outside my src/images folder, but that will mean two locations for images, or perhaps I could move my src/images folder up a level and keep all images in one folder?
I suppose at the end of the day I could do either but I'm wondering if I'm missing something or there is a preferred way?
Thanks
Bryan
The text was updated successfully, but these errors were encountered: