Jacek
January 10, 2022, 12:22pm
1
Images not loading on dev mode if I try get path to media library with ACF. There is no any error, path is correct. After build it’s loading correctly, but after “yarn dev” is still missing.
It looks like some issue with get relative path on localhost:3000. Any one have similar problem?
Jacek
January 10, 2022, 12:49pm
2
I’ve found the same issue on Sage repo
opened 07:32PM - 06 Jan 22 UTC
bug
### Terms
- [X] I have read the [guidelines for Contributing to Roots Projects]… (https://github.com/roots/.github/blob/master/CONTRIBUTING.md)
- [X] This request is not a duplicate of an existing issue
- [X] I have read the [docs](https://roots.io/docs/) and followed them (if applicable)
- [X] I have seached the [Roots Discourse](https://discourse.roots.io/) for answers and followed them (if applicable)
- [X] This is not a personal support request that should be posted on the [Roots Discourse](https://discourse.roots.io/) community
### Description
#### What's wrong?
Images uploaded to wordpress can be seen in the proxy address or after `yarn build`. I do not see the images when in `yarn dev`, as they are shown as broken. The theme images aren't affected.
I am using the wordpress function `wp_get_attachment_image()` which uses all thumbnails in srcset and it is using relative paths.
When opening the image link, instead of the image a small white square is shown.
I am using Laravel Valet as local server.
![image](https://user-images.githubusercontent.com/13618783/148440048-f4bf33ef-ee57-4946-a756-1461d93c19f8.png)
![image](https://user-images.githubusercontent.com/13618783/148440137-188854e8-bded-4952-8f33-56e62a74ede2.png)
### Steps To Reproduce
1. Upload image to Wordpress page (I used acf field)
2. In the view, use `{!! wp_get_attachment_image($image['id'], 'full', null, ['class' => '']) !!}`
3. run `yarn dev`
### Expected Behavior
Images shouldn't appear as broken
### Actual Behavior
Images appear as broken, but not on proxy.
### Relevant Log Output
_No response_
### Versions
10.0.0-beta2
ben
January 10, 2022, 4:26pm
3
If that’s the same issue, disable Soil’s relative URL module for now
3 Likes