Custom request on "src" attributes
Hi @mathiasbc by using the latest https://github.com/artf/grapesjs/releases/tag/v0.14.43 It should work with something like this
Read full answer below ↓Question
I implemented a small GrapesJS editor that allows to edit Django/Jinja2 templates. GrapesJS by default is trying to GET the image preview of my element: <a href="{{producturl}}" target="blank"><img src="{{imageurl}}" width="130"/></a> The request happens everytime I load the template into the GrapesJS editor: http://localhost:8000/%7B%7Bimageurl%7D%7D 404 (Not Found) GrapesJS editor though works fine even with this 404 call. But I would like to do handle the request to the image. So instead of GrapesJS making a default call to http://localhost:8000/%7B%7Bimage_url%7D%7D I would like to render...
Answers (3)
Hi @mathiasbc by using the latest https://github.com/artf/grapesjs/releases/tag/v0.14.43 It should work with something like this
Hi Mathias, currently the only possibility I see now is to extend the image component and its render() method. Probably I'll add some new component event to make such a case easier to manage
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #418
Can't replace image if it's inside a link
Hi, If import this code inside the editor: And double click the image to change it, when I choose a new image from the modal, nothing happe...
Issue #1812
[Bug]: 404 when trying to add background image (reproducible in demo)
Visit https://grapesjs.com/demo.html in Chrome IncognitoClick the "Header" elementClick Decorations > BackgroundDelete Layer 2Click Layer 1...
Issue #1816
Not allowing to upload same image on same the position after delete that image
Ajax call which is uploading image file in assests folder It's working fine to add an image from the local. But in another scenario, It's n...
Issue #1615
[Feature] support edit credentials request attribute on Remote Storage
The credentials options its forced to be 'include' on Remote Storage. https://github.com/artf/grapesjs/blob/master/src/storage_manager/mode...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Tutorial
Super Tooltip for GrapesJS — Version 0.1.5 Released 🎉
We’re excited to announce the v 0.1.5 update of Super Tooltip, our floating‑menu and tooltip plugin for GrapesJS
Tutorial
GrapesJS in 2026: The Complete Guide to the Open-Source Web Builder Framework
Master GrapesJS in 2026. Architecture, code examples, React integration, plugin development, Studio SDK, and how it compares to other projects
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.