Problem image alignment

Created on 6 June 2024, 6 months ago

Problem/Motivation

I have a drupal 9 site with hundreds of images and I'm migrating it to drupal 10.

Steps to reproduce

1. In D9 the image, loaded with IMCE, is centered (fig. 1).
<img alt="effetto fotoelettrico" data-align="center" data-entity-type="file" data-entity-uuid="9757456e-84ce-4f74-a40f-c31db7fcaca2" height="213" src="/sites/default/files/fisica/fotoelettrico.gif" width="396" />

2. I copy/paste the node in d10: the image is not centered (fig. 2).

3. In “Edit” it appears centered (fig. 3).

4. I put “align left and wrap text” and center it again; save and the image is not centered.

Proposed resolution

Temporary solution:
I put “in-line” and align the text (fig. 4):

<p class="text-align-center">
    <img src="/sites/default/files/fisica/fotoelettrico.gif" data-entity-uuid="9757456e-84ce-4f74-a40f-c31db7fcaca2" data-entity-type="file" alt="effetto fotoelettrico" width="396" height="213">
</p>

Doing this for many hundreds of images is crazy. Is there another faster solution?

Thank you and greetings

💬 Support request
Status

Active

Version

10.2

Component
CKEditor 5 

Last updated about 16 hours ago

Created by

🇮🇹Italy giordy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024