700ml Posted June 22, 2021 Share Posted June 22, 2021 Hello! New to ProcessWire, it's been a great experience so far! I'm using a module (Import CSV) that requires me to enter the URL of images. I have uploaded a folder of all the images into a directory at path "/site/templates/img" –– however, when I try to find the image ("https://www.mysite.com/site/templates/imgs/image1.jpg"), ProcessWire returns a 404 page... I'm wondering how I can setup permission so that a folder of files can be accessed via URL and referenced in this module, as either a full-URL, or where to put the files/what to setup, so it can be read as a relative url! Thank you for any support. 1 Link to comment Share on other sites More sharing options...
diogo Posted June 22, 2021 Share Posted June 22, 2021 It shouldn't be a problem to access that image directly, that's exactly what happens with the css and js files that you add in the templates folder. It could be a permissions problem in the server, but then you wouldn't have that 404 page. May seem too obvious, but make sure that you wrote the url correctly ? 3 Link to comment Share on other sites More sharing options...
3fingers Posted June 23, 2021 Share Posted June 23, 2021 Are you sure you're using the correct syntax? // eg: <img src="<?= $urls->templates ?>img/your_image.jpg"> // $urls is a shorthand for $config->urls Link to comment Share on other sites More sharing options...
dotnetic Posted June 25, 2021 Share Posted June 25, 2021 In your post you wrote two different directories. First you mention an "img" folder, then you try to acces the "imgs" folder. Please check that you are using the correct path. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now