Problem/Motivation

I have some inline images uploaded directly in some CK Editor fields. And those images were not exported in the assets. So, accordingly the referenced images from CK editor are broken in the higher environment where I am trying to import the content .

EDIT: The image was inserted using contrib entity_embed module.

Steps to reproduce

1. Upload some image in your Body field (of any content type) in any node
2. Go to export page path of that particular node
3. Now, export it as either YML or export as zip. You will see that assets were not exported there.
4. Go to other higher enviornment where the content has to be imported and follow the import page link there.
5. Import your yml file there and node created as part of import will have image reference in body field which will ultimately be external link to source site.

Proposed resolution

I belief there are some of modules available in Drupal.org which can help import the referenced images as media . Let me search that.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Shikha_LNweb created an issue. See original summary.

abramm’s picture

Hi Shikha_LNweb,
Can you please provide the example HTML content?

nginex’s picture

Version: 2.0.x-dev » 1.4.x-dev

As far as I know we support embedded media in ckeditor, so if it’s img tag then it’s not supported yet

shiks’s picture

@abramm

Apologies for delays in response.

Example :

<img src="https://.../files/inline-images/Screenshot%202023-11-22%20at%2011.06.00%20AM.png" data-entity-uuid="084c5cf5-c2b5-4243-81ed-7d6d0cd0c300" data-entity-type="file" width="50">
<p>
    Testing
</p>
shiks’s picture

@nginex

Yes, I am using img tag. Can you please confirm if there is some patch available or some plans to support the embedded img tag soon ?

abramm’s picture

This looks like you're using the entity_embed module; can you please confirm that?

shiks’s picture

yes, using entity_embed for other purposes. @abramm

abramm’s picture

Title: Embedded images in CK Editor fields are not exported in the assets » Support exporting images inserted via entity_embed module
Category: Bug report » Feature request
Issue summary: View changes

Images inserted via entity_embed aren't supported right now. The entity_embed is a third party contrib module which does inline images processing in its own way.

This is not a bug, so I'm changing this to feature request; we might support this in future if someone would be interested in implementing it.

shiks’s picture

Let me put some time on it and try creating a patch for it . @abramm

abramm’s picture

We're not your personal developers army @Shikha_LNweb, I'd be happy to review the MR adding the feature you need if you'd submit one.

nikhil_dawar’s picture

StatusFileSize
new8.35 KB

I've completed the patch that enables the import/export of embedded images through SCS as per above-mentioned request.
Thank you

manpreet_singh’s picture

Status: Active » Needs review
abramm’s picture

Status: Needs review » Needs work

Hi nikhil_dawar,

Thank you for the patch!

Can you please create the MR? We have some tests and automatic checks that I'd like to see before we move forward.
Also I can see you've commented out a part of code; we don't keep dead code in repository so let's remove it altogether.

abramm’s picture

Issue tags: +Needs tests

Manpreet_Singh changed the visibility of the branch 3403294-support-exporting-images to hidden.

nikhil_dawar’s picture

StatusFileSize
new8.25 KB

Hi abramm, here I have removed the dead code from the patch

nikhil_dawar’s picture

StatusFileSize
new8.25 KB