Hi Team,

We upgraded our site from Drupal 10.1.5 to 10.2.7.

After the upgrade, the images uploaded using "Media Library" on the "CKEditor" were not rendering on the site.

A reference image is attached.

When we check on the editor, the preview of the image is also not showing. 

The image source is rendered as [src="sites/files/blank.gif"] on the page.

Please help us to fix this issue.

CommentFileSizeAuthor
media_library.PNG26.59 KBrharikumar_cse

Comments

rharikumar_cse created an issue. See original summary.

cilefen’s picture

Category: Task » Support request
Priority: Major » Normal
Issue tags: -media library

What exactly is shown on the "source" view in CKEditor on the node you showed above?

rharikumar_cse’s picture

On the source it is showing as

<drupal-media data-entity-type="media" data-entity-uuid="42db8c30-ca97-442f-9c1b-a343d04edc50">&nbsp;</drupal-media>

But when we save and look on the page, the src attribute on the img tag is "sites/files/blank.gif"

cilefen’s picture

"blank.gif" doesn't appear in Drupal Core's source code. Are there additional media or image-related modules installed on the site? Were there any errors or difficulties upgrading? Are any patches installed?

rharikumar_cse’s picture

There is no patches added related to the media or image.

Modules

Media
Media Library
Image
Blazy UI (Latest version)

cilefen’s picture

If you export the entire site configuration, does "blank.gif" appear in those files? If so, which file?

rharikumar_cse’s picture

That is from custom theme twig file.

themes->custom->theme_name->templates->system->image.html.twig

{#
/**
 * @file
 * Theme override of an image.
 *
 * Available variables:
 * - attributes: HTML attributes for the img tag.
 * - style_name: (optional) The name of the image style applied.
 *
 * @see template_preprocess_image()
 */
#}
<img{{ attributes }} class="lazyload" src="/sites/files/blank.gif" data-src="{{datasrc}}" />
cilefen’s picture

So your lazy load implementation probably broke or is missing. Are there browser console errors?

You can try deleting that theme file. Lazy load is built in to Drupal image tags now.

rharikumar_cse’s picture

By deleting the twig file on the theme,  broke the site.

We updated the twig file, and the issue got fixed.

Thanks for the prompt response and your help.

cilefen’s picture

Status: Active » Closed (outdated)