Answers.Body: <p>I was adding a slash in from after grabbing image urls in my template code,</p>
  
  <pre><code>/{{ image }}
  </code></pre>
  
  <p>Did not think about how it might break redactor.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T02:38:51.877Z
Answers.LastActivityDate: 2016-08-08T02:38:51.877Z
Answers.UserDisplayName: David B
Answers.Body: <p>I ran into a similar issue. The paths that were being inserted for images in the Redactor field were relative, like <em>assets/folder/file.jpg</em> so in the context of the Craft admin, they were trying to load a path like <em>admin/entries/blog/assets/folder/file.jpg</em> which obviously wouldn't work.</p>
  
  <p>I was able to fix this by updating the "assetsBaseUrl value in my craft/config/general.php to include a leading slash, like:</p>
  
  <pre><code>'assetsBaseUrl' =&gt; '/assets'
  </code></pre>
  
  <p>That forced the admin to reach out to the absolute root location of the assets folder rather than trying to load based on a relative path from somewhere deep inside the admin.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-09-11T21:52:57.060Z
Answers.LastActivityDate: 2019-03-03T05:10:58.033Z
Answers.LastEditDate: 2019-03-03T05:10:58.033Z
Answers.UserDisplayName: Will Henderson
Body: <p>I have an issue that I really do not expect. When using the image function in the Redactor wysiwyg editor, images come up broken. In the editor, and in the rendered entry. All that is missing is a / in the img tag and they work. So redactor is rendering,</p>
  
  <pre><code>&lt;img src="assets/page/AdobeStock_53786360.jpeg" alt="AdobeStock_53786360.jpeg#asset:99"&gt;
  </code></pre>
  
  <p>and but what it needs is the beginning /</p>
  
  <pre><code>&lt;img src="/assets/page/AdobeStock_53786360.jpeg" alt="AdobeStock_53786360.jpeg#asset:99"&gt;
  </code></pre>
  
  <p>Have I configured something else wrong?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-05T09:06:25.657Z
Comments.Text: What's in your Asset source's URL setting?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-08T02:37:46.153Z
Comments.Text: Yep that was it. I guess I was adding a / in my templates when grabbing an image. Did not realize that it would break redactor. Thanks!
Comments.UserDisplayName: David B
Tags: <redactor><image>
Title: Images Broken In Redactor
ThreadText: # Images Broken In Redactor
  
  (Asked by: username_0 on 2016-08-04)
  
  I have an issue that I really do not expect. When using the image function in the Redactor wysiwyg editor, images come up broken. In the editor, and in the rendered entry. All that is missing is a / in the img tag and they work. So redactor is rendering,
  
  ```
  <img src="assets/page/AdobeStock_53786360.jpeg" alt="AdobeStock_53786360.jpeg#asset:99">
  
  ```
  
  and but what it needs is the beginning /
  
  ```
  <img src="/assets/page/AdobeStock_53786360.jpeg" alt="AdobeStock_53786360.jpeg#asset:99">
  
  ```
  
  Have I configured something else wrong?
  
  **Tags:** redactor, image
  
  > **Comments:**
  > **username_1**: What's in your Asset source's URL setting?  
  > **username_0**: Yep that was it. I guess I was adding a / in my templates when grabbing an image. Did not realize that it would break redactor. Thanks!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2016-08-08. Score: 1
  
  I was adding a slash in from after grabbing image urls in my template code,
  
  ```
  /{{ image }}
  
  ```
  
  Did not think about how it might break redactor.
  
  
  ---
  
  ### Answer by username_2 on 2017-09-11. Score: 1
  
  I ran into a similar issue. The paths that were being inserted for images in the Redactor field were relative, like *assets/folder/file.jpg* so in the context of the Craft admin, they were trying to load a path like *admin/entries/blog/assets/folder/file.jpg* which obviously wouldn't work.
  
  I was able to fix this by updating the "assetsBaseUrl value in my craft/config/general.php to include a leading slash, like:
  
  ```
  'assetsBaseUrl' => '/assets'
  
  ```
  
  That forced the admin to reach out to the absolute root location of the assets folder rather than trying to load based on a relative path from somewhere deep inside the admin.
  
  
  ---
  
  