svitcov Posted June 18, 2013 Share Posted June 18, 2013 Hi - All images served from PW's image fields are giving me 403s. Any ideas why? For context, inspect on the slider here: http://archnetglobal.com/ Thanks. EDIT: Relevant line of code below. <img src="<?php echo $slide->image->url; ?>" /> (Missing ALT tag right now) Link to comment Share on other sites More sharing options...
kongondo Posted June 18, 2013 Share Posted June 18, 2013 Welcome to the forums Svitcov! Looks like you are trying to directly access the assets folder using a PHP file that is not a template file? If that is the case, PW will block you from directly accessing that and other folders, e.g. /site/templates/ using your own PHP files. Link to comment Share on other sites More sharing options...
horst Posted June 18, 2013 Share Posted June 18, 2013 Hi, your src of the images i sonly the path to the folder, the files-basename is missing! <img src="/site/assets/files/1011/" /> What do you use in the code of your template-file? Link to comment Share on other sites More sharing options...
svitcov Posted June 18, 2013 Author Share Posted June 18, 2013 @Kongondo - Actually, the PHP file is a template file. It is my home page template. @horst - See OP, I edited a few mins ago. Link to comment Share on other sites More sharing options...
horst Posted June 18, 2013 Share Posted June 18, 2013 (edited) Welcome to the forums Svitcov! Looks like you are trying to directly access the assets folder using a PHP file that is not a template file? PW will block you from directly accessing that and other folders, e.g. /site/templates/ using your own PHP files. @kongondo: I think this is not right. The images reside in the site/assets/files/ folders, and they can be accessed directly. This is normal behave. @svitcov: your img-urls have no filename, something like myimagename.jpg! Edited June 18, 2013 by horst 1 Link to comment Share on other sites More sharing options...
kongondo Posted June 18, 2013 Share Posted June 18, 2013 @Horst: I thought he was using a PHP file outside the PW system (i.e., I didn't know it was a template file). @Svitcov: What is $slide? How does your other code look like just before what you have shown us above? 1 Link to comment Share on other sites More sharing options...
kongondo Posted June 18, 2013 Share Posted June 18, 2013 (edited) Out of curiosity, try this instead <?php echo "<img src='{$slide->image->url}'/>";?> But your code above should also work actually Edited code above to add {} Edited June 18, 2013 by kongondo Link to comment Share on other sites More sharing options...
svitcov Posted June 18, 2013 Author Share Posted June 18, 2013 Ok, it was a simple configuration error. I had max files set to 0 instead of 1 (I meant for it to be a single image, not multi). Thanks for the help! Link to comment Share on other sites More sharing options...
kongondo Posted June 18, 2013 Share Posted June 18, 2013 Is that a dev site by the way? The slider image sizes are massive (parliament-1.png is 4MB; cliff-1.png is 5.8MB!) and are taking time to load. Just wondering...Beautiful site btw 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