Make WordPress Core

Opened 18 months ago

#56768 new defect (bug)

Images encoded with Base64 with a given string length appears weird in editor but kills the post render on the site

Reported by: burgatshow's profile burgatshow Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0.2
Component: Editor Keywords:
Focuses: Cc:

Description

Dear Developers,

I tried to put an image into one of my posts encoded with base64. The image is encoded from PNG to Base64 using macOS

base64 -i input.png -o output.png.txt

command.

The image converted and successfully edited in the related post image block by entering HTML editor and replaced the img src="" with the following:

<figure class="wp-block-image aligncenter"><img src="data:image/png;base64,<base64 long string>" alt="Alternate text" /></figure>

When I switched back to preview mode, the image successfully displayed in the editor, however the post when published is broken.

I have some screenshots from my blog site as well as the image as base64 file.

Attachments (5)

DSC_1625.png (6.5 MB) - added by burgatshow 18 months ago.
Original large PNG
DSC_1625.png.txt (8.7 MB) - added by burgatshow 18 months ago.
Large PNG as Base64
My-Post.png (192.8 KB) - added by burgatshow 18 months ago.
Small PNG
My-Post.png.txt (257.1 KB) - added by burgatshow 18 months ago.
Small PNG as Base64
screnshost_from_site.zip (5.2 MB) - added by burgatshow 18 months ago.
Screenshots I made with the issue

Change History (5)

@burgatshow
18 months ago

Original large PNG

@burgatshow
18 months ago

Large PNG as Base64

@burgatshow
18 months ago

Small PNG

@burgatshow
18 months ago

Small PNG as Base64

@burgatshow
18 months ago

Screenshots I made with the issue

Note: See TracTickets for help on using tickets.