Skip to content

Media Gallery Thumbnail For Image Missing Until Refresh (Gitlab Self-hosted Repo) #1985

@Undistraction

Description

@Undistraction

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

  1. 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>

Screenshots
After Upload:
screenshot 2019-01-01 at 00 19 28

After Page Refresh:
screenshot 2019-01-01 at 00 20 02

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions