-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Description
Describe the bug
When a new image is uploaded to the Media Gallery, no image is displayed for it until the page is refreshed.
To Reproduce
- Upload an image to the media gallery (
.png
or.jpg
)
Expected behavior
An image appears as a preview for the image file.
Observations
- No error in console
- Element html doesn't contain an
<img>
element:
<div width="280px" tabindex="-1" class="css-1pm9uix e984n9b0">
<div>
<div class="css-2294xc e984n9b2"></div>
</div>
<p class="css-5gfplu e984n9b3">dawg.jpg</p>
</div>
- If image is added it is correctly rendered inline.
- If Media Gallery is reopened it is still not rendered.
- It will only be rendered after a page refresh.
- Looks like this is related to Need to reload page after uploading image to show the thumbnail #993. Either a regression or something that was never fixed for Gitlab
Additional
Refreshing the page causes its own problems. After a page refresh, any images that were uploaded subsequent to the most recent deploy will be broken. Although the path is correct, there is no image at that location. The images will only work after a new deploy, at which point images do exist at the same paths. I've noticed some mention of this is other issues, but there doesn't appear to be an issue that captures this problem. Should I file a separate issue for it?
Applicable Versions:
- Netlify CMS version: netlify-cms 2.3.2
- Git provider: Gitlab
- OS: OSX
- Browser version: 71.0.3578.98
- Node.JS version: 8.11.3
CMS configuration
backend:
name: gitlab
repo: company/repo
auth_type: implicit
app_id: XXXXXXXXX
api_root: https://gitlab.comnpany.com/api/v4
base_url: https://gitlab.comnpany.com
auth_endpoint: oauth/authorize
slug:
clean_accents: true
sanitize_replacement: '-'
media_folder: static/images/uploads
public_folder: /images/uploads
ciokan, robertSahm, wayferer, ayedo and sparkalow