MateThemes Posted September 8, 2019 Share Posted September 8, 2019 Hello everyone! I have webcam images, that are uploaded every 5 minutes to the server. Currently the webpage is written in plain html but we want to switch to processwire. The current file path is in the root -> cam/someimage.jpg. Now if i am installing processwire, processwire will be in the root and the images could be still in cam/someimages.jpg but how can I access this images on a page? Or does anyone have expiriences with such topics? Thank you in advance! Link to comment Share on other sites More sharing options...
Sebi Posted September 9, 2019 Share Posted September 9, 2019 Hi @MateThemes, ProcessWire allows you to have any custom folder you want in its root, so you can leave your cam-directory where it is. The path to the images will stay the same. So, if you included an image with <img src="/cam/someimage.jpg"/> before, you do it just like that in your processwire-template file. Just a small restriction to notice: You must not create a page with "cam" as path in processwire, because that will block access to your folder. 2 Link to comment Share on other sites More sharing options...
dragan Posted September 9, 2019 Share Posted September 9, 2019 19 hours ago, MateThemes said: but how can I access this images on a page? Do you mean access them from an images-field on that page? In that case you'd change the image path to site/assets/files/page-id/ instead. But you'd still have to add the images to the field programmatically so that PW "sees" the new pics (via hook or Cron). Link to comment Share on other sites More sharing options...
MateThemes Posted September 10, 2019 Author Share Posted September 10, 2019 19 hours ago, Sebi said: Hi @MateThemes, ProcessWire allows you to have any custom folder you want in its root, so you can leave your cam-directory where it is. The path to the images will stay the same. So, if you included an image with <img src="/cam/someimage.jpg"/> before, you do it just like that in your processwire-template file. Just a small restriction to notice: You must not create a page with "cam" as path in processwire, because that will block access to your folder. Thank you for your help!!! It is good that I can leave everything as it is! 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