Answers.Body: <p>The issue is that your Asset Volume URL is <code>@web/image</code> but your Asset Volume path is <code>@webroot/assets/art</code></p>
  
  <p>That means that Craft will look for the images on disk (to do transforms, etc.) in <code>web/assets/art</code> but it will generate URLs for frontend requests that point to <code>http://example.com/image</code> -- where presumably nothing exists.</p>
  
  <p>These should probably be:</p>
  
  <ul>
  <li>URL: <code>@web/assets/art</code></li>
  <li>Path: <code>@webroot/assets/art</code></li>
  </ul>
  
  <p>...assuming that the <code>web/assets/art/</code> directory is where these images live.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T17:23:32.513Z
Answers.Text: Thank you, this worked perfectly. Question: what if I want to have my images stored outside webroot, but have public URLs? How can I achieve that? Thank you
Answers.UserDisplayName: Dwarf Vader
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T19:24:25.437Z
Answers.Text: It can be done, but why would you want to do that?
Answers.UserDisplayName: andrew.welch
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T21:38:18.653Z
Answers.Text: I want to find out what the system is capable of and what its limitations are
Answers.UserDisplayName: Dwarf Vader
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-11T07:31:51.797Z
Answers.Text: @andrew.welch, can you elaborate on the configuration required for storing the assets on disk outside of the web root?
  
  My use case for doing this is in a development environment where I'd like the base asset path to be an environment variable storing a path to a shared disk location where assets are maintained for all developers that are developing the site.
  
  I can serve the assets from another base path using some Nginx configurations, but I'm interested to know if it's possible without this.
Answers.UserDisplayName: Tim Everts
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T17:16:26.223Z
Answers.LastActivityDate: 2018-08-28T17:16:26.223Z
Answers.UserDisplayName: andrew.welch
Body: <p>I wanted to include some uploaded assets (images) in an entry. The <code>.url</code> property in twig outputs the proper URL, in my case:</p>
  
  <blockquote>
    <p><a href="http://localhost/craftcms/web/image/photo-2017-04-02-16-20-53-1.jpg" rel="nofollow noreferrer">http://localhost/craftcms/web/image/photo-2017-04-02-16-20-53-1.jpg</a></p>
  </blockquote>
  
  <p>However, that link is broken. Following it leads to a 404 error page:</p>
  
  <blockquote>
    <p>Template not found: image/photo-2017-04-02-16-20-53-1.jpg</p>
  </blockquote>
  
  <p>Viewing it in the admin panel preview also displays a broken image sign.</p>
  
  <p>If I disable the Public URL switch in the asset settings, the image display fine in the admin panel, but obviously I cannot use them in public pages.</p>
  
  <p>I wasn't able to find a working fix for this. I tried the multiple-environment config solution from these forums just in case, but it did not help me.</p>
  
  <p>Update: here is a screenshot of my Assets volume settings:
  <a href="https://i.sstatic.net/a3bhV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/a3bhV.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-24T14:14:38.060Z
Comments.Text: What did you set the File System Path and the URL to? Is this a Craft 2 build?
Comments.UserDisplayName: Jay
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-24T14:38:57.807Z
Comments.Text: The public URL needs to be publicly accessible, so in your web root folder. (the "web" folder by default in a craft3 project)
  
  Is your assets folder in there?
Comments.UserDisplayName: billythekid
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-24T19:24:25.330Z
Comments.Text: This is a Craft 3 install. The public URL is indeed publicly accessible - inside the web folder as you suggested (see original post). The file system path - I also tried putting it in the web folder, as well as outside of it. No avail
Comments.UserDisplayName: Dwarf Vader
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-27T14:51:23.317Z
Comments.Text: Can you please update your question with a screenshot of the Asset volume settings?
Comments.UserDisplayName: Jalen Davenport
Tags: <assets><url><routing>
Title: Asset (image) public URL does not work
ThreadText: # Asset (image) public URL does not work
  
  (Asked by: username_0 on 2018-08-24)
  
  I wanted to include some uploaded assets (images) in an entry. The `.url` property in twig outputs the proper URL, in my case:
  
  > <http://localhost/craftcms/web/image/photo-2017-04-02-16-20-53-1.jpg>
  
  However, that link is broken. Following it leads to a 404 error page:
  
  > Template not found: image/photo-2017-04-02-16-20-53-1.jpg
  
  Viewing it in the admin panel preview also displays a broken image sign.
  
  If I disable the Public URL switch in the asset settings, the image display fine in the admin panel, but obviously I cannot use them in public pages.
  
  I wasn't able to find a working fix for this. I tried the multiple-environment config solution from these forums just in case, but it did not help me.
  
  Update: here is a screenshot of my Assets volume settings:
  [![enter image description here](https://i.sstatic.net/a3bhV.png)](https://i.sstatic.net/a3bhV.png)
  
  **Tags:** assets, url, routing
  
  > **Comments:**
  > **username_1**: What did you set the File System Path and the URL to? Is this a Craft 2 build?  
  > **username_2**: The public URL needs to be publicly accessible, so in your web root folder. (the "web" folder by default in a craft3 project)  Is your assets folder in there?  
  > **username_0**: This is a Craft 3 install. The public URL is indeed publicly accessible - inside the web folder as you suggested (see original post). The file system path - I also tried putting it in the web folder, as well as outside of it. No avail  
  > **username_3**: Can you please update your question with a screenshot of the Asset volume settings?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2018-08-28. Score: 7 | Accepted answer
  
  The issue is that your Asset Volume URL is `@web/image` but your Asset Volume path is `@webroot/assets/art`
  
  That means that Craft will look for the images on disk (to do transforms, etc.) in `web/assets/art` but it will generate URLs for frontend requests that point to `http://example.com/image` -- where presumably nothing exists.
  
  These should probably be:
  
  * URL: `@web/assets/art`
  * Path: `@webroot/assets/art`
  
  ...assuming that the `web/assets/art/` directory is where these images live.
  
  > **Comments:**
  > **username_0**: Thank you, this worked perfectly. Question: what if I want to have my images stored outside webroot, but have public URLs? How can I achieve that? Thank you  
  > **username_4**: It can be done, but why would you want to do that?  
  > **username_0**: I want to find out what the system is capable of and what its limitations are  
  > **username_5**: @username_4, can you elaborate on the configuration required for storing the assets on disk outside of the web root?  My use case for doing this is in a development environment where I'd like the base asset path to be an environment variable storing a path to a shared disk location where assets are maintained for all developers that are developing the site.  I can serve the assets from another base path using some Nginx configurations, but I'm interested to know if it's possible without this.  
  
  ---
  
  