Issue #1462💬 AnsweredOpened September 27, 2018by aerionTech0 reactions

Uploaded image error

Quick answerby artf

You should output this for your upload endpoint: https://grapesjs.com/docs/modules/Assets.html#response eg.

Read full answer below ↓

Question

We have gotten GrapesJs integrated into our Angular application. We have the asset manager showing a list of images that have been uploaded. Initially, there are no images and upon dragging an image and then handling the upload the asset manager shows the correct image. Upon uploading an image we are returning an object with one image in the data property, so the 1 image is appended to the existing. On initialisation, we are returning an object will the existing images. The problem exists in the uploaded image, it's shown in the editor with the "missing picture" image and does not show the up...

Answers (3)

aerionTechSeptember 27, 2018

Hi That worked, in the documentation, you might want to update the documentation to remove the first line in the array and only use the object version for the return data. { data: [ 'https://.../image.png', // ... { src: 'https://.../image2.png', type: 'image', height: 100, width: 200, }, // ... ] }

artfSeptember 29, 2018

@aerionTech right, but I think I'll update the upload function to make it understand also string items

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.