Closed (fixed)
Project:
Blazy
Version:
8.x-2.0-rc7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2020 at 15:03 UTC
Updated:
30 Mar 2020 at 09:44 UTC
Jump to comment: Most recent
When using the blazy filter on a CKE field containing an image that it is aligned to the center, the image is not aligned correctly.
That's because the align-center class is moved from the img tag to the wrapper.
Before:
<img alt="Test" data-entity-type="file" data-entity-uuid="9ba42395-fd06-49c8-a909-745714fc38dd" src="/system/files/inline-images/Capture%20du%202019-09-25%2011-26-03.png" class="align-center">
After:
<div class="media-wrapper media-wrapper--blazy align-center"> <div class="media media--blazy media--image">
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'image' -->
<!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/image.html.twig' -->
<img alt="Test" title="Capture du 2019-09-25 11-26-03.png" class="media__image media__element b-lazy b-loaded" loading="lazy" src="/system/files/inline-images/Capture%20du%202019-09-25%2011-26-03.png" typeof="foaf:Image" data-bio-hit="1" width="452" height="126"><!-- END OUTPUT from 'core/themes/classy/templates/field/image.html.twig' --></div>
</div>
The attached patch adds some CSS that fixes the issue.
| Comment | File | Size | Author |
|---|---|---|---|
| blazy-img_align_center.patch | 355 bytes | prudloff |
Comments
Comment #2
gausarts commentedThank you!
Please allow some delay to get back to this.
Comment #3
gausarts commentedSorry, wrong room.
Comment #5
gausarts commentedCommitted. Thank you for contribution!