Jump to content

Image doesn't load and it gives a 403 error


Recommended Posts

Hello everyone!

I’m starting my PW journey and I’m enjoying it so far :-)

However, I’m having the exactly same problem as posted here https://processwire.com/talk/topic/10073-image-not-showing-up-in-tutorial/?hl=%2Bimage+%2B403

I’m running MAMP 3.2.1 on OSX 10.10.3

The issue is that the image doesn’t load on the page. It just gives me a broken link. If I click on the broken link I get:

<title>403 Forbidden</title>
<p>You don't have permission to access /site/assets/files/1015/
on this server.</p>

Here is my PHP code:

<img src="<?php echo $page->promote->url; ?>" />

And my field to showed that I used the same name for it.


More info:

  • I changed the assets/file permissions to 777. It didn’t work.
  • I changed MAMP user. It didn’t work.
  • There is no error.txt under logs folder.
  • There is no mod_security module.

I hope I can get some help here.


Link to comment
Share on other sites

Hello @Soma

Yeah.. it worked. However, now I'm confuse.

I'm just following the tutorial But what if I don't know how to code?, and I didn't create any other image field.

Now I'm imagining how do I build a page that will display several images?

You talked about array (and I believe that the 'first' is the array index, right?). Could you give me more details?

Thank you a lot for your help.

Link to comment
Share on other sites

Hi @zilli

Now I'm imagining how do I build a page that will display several images?

You can add as many images as you want to an image field in PW. This is assuming your images field hasn't been set to max 1 when setting up the image field.

If I have a PW page that requires several images, they're all dropped into my General Images field. Then, in CK editor, I choose which ones I want to manually output in my Body field.

If we're working with templates and you want to iterate through several images and echo them onto a page (for example, a gallery) , you can do that easily.

Can you give us a use-case? There is so much flexibility here, you can work in a number of ways with images.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...