Images not loading #595
Comments
I think this might be related to |
@wellingguzman this wrong url is returned by the api |
@dur41d Hi, can you provide your config with the storage area? I am not a contributor but also develop under https on a subdomain. I am working on the file uploading right now and this is really interesting to me. |
Hey @dur41d is Directus behind a proxy? |
Hi @AntiCZ. My config is the default one. i didn't change anything except for the paths. 'storage' => [ |
Hi @wellingguzman .. i don't know but I don't think so.. I'm using a shared host. How can I find out? |
I have the same problem running on webfaction shared, image links add the trialing port to the url: ":80" before the slug. |
Confirming #589 fixes this. |
A question: isn't it better to leave the link without a scheme to avoid all scheme problems like: //domain.com/image.jpg |
@wellingguzman How do i test fix? I'm using the latest from directus master branch. I'm not using the api project. I understand that the API is returning the path but I'm suggesting that it returns it without a scheme to avoid scheme related problems like this one. |
You can manually update those changes reflected in the PR https://github.com/directus/api/pull/589/files (look at the new lines)
The API return the url without the scheme or host, only the path, but the app uses the full url to make sure it uses the proper url (the app can be in different host from the api) This should be fixed in the API, as the #589 tries to do, if you can confirm this is also working for you, I will merge it and will be released on the next Directus version. |
@wellingguzman I tested the fix and I confirm that it works. |
Awesome! Thanks @Anthonyzou, @makote and @dur41d. |
This ticket has been fixed by d91c0d0 |
I also have this issue... There's no error whatsoever when uploading or choosing images however... it's really only the previewing inside the app that is broken. I also made the 'read' of the directus_files enabled inside the Roles&Permissions Public settings.. What am I doing wrong? |
Ok I just figured out the following: I'm using Directus for two separate projects (and hence servers). I guess this means this bug is related to sharp and Debian 10. Also this bug only appears when using jpegs, with pngs everything works fine. |
Bug Report
When uploading images (or files) via the admin interface the images don't load and the broken image icon appears. I checked the url being requested and the port is wrong. Here is an example:
https://maakom.nfshost.com:80/directus/public/uploads/_/originals/(Solaris).jpg
port (80) with https does not work. When 80 is removed the image is loaded correctly.
Steps to Reproduce
Technical Details
master
branchThe text was updated successfully, but these errors were encountered: