Update: Pasting Flickr embed codes into WordPress blocks

About a year and half ago I wrote about a bug that emerged in the WordPress block editor. You used to be able to paste a Flickr embed code into an empty block, and the image would appear. The bug broke this.

Someone at WordPress noticed my complaint and wrote up this detailed bug report in the WordPress GitHub (account required). It’s gotten a little attention in the intervening months, with its most recent update in April. But the bug persists.

An aside: As a fellow who makes his living in the software industry, I’m not at all surprised that WordPress hasn’t fixed this bug. I can’t imagine that this one ranks high on the to-fix list, as Flickr embeds are probably not a critical function. You can fix only so many bugs. Reading the report, there’s broad agreement that it is a bug, and some work has been done to get at its root cause.

The workaround I initially found is to create an HTML block, paste the Flickr embed code into it, delete the <script> tag from it, and convert it to a regular block. It’s a lot of steps for a simple result, but it works.

But recently I stumbled upon an even easier workaround. Create an Image block and press Ctrl-V to paste the Flickr embed code. Bam, the image appears. This method strips the <script> tag for you! It’s so much easier.

Empty Image block. After you copy the Flickr embed code, create one of these and press Ctrl-V to paste the image.


4 responses to “Update: Pasting Flickr embed codes into WordPress blocks”

  1. Daniel Brinneman Avatar

    Good idea.

  2. matt Avatar

    This makes me want to make snide remarks about WordPress’s Unhappiness Engineers and their willingness to entertain feedback from users about the Block Mangler. But I won’t…

    You, at least, have a good work around.

  3. adventurepdx Avatar

    Yep, this is basically what I do, though I just usually use the “image” blog if it’s one image. I’ve used the flickr block to add an album to a WordPress post. It makes sharing a bunch of photos on a blog post so much easier!

    1. Jim Grey Avatar

      Thanks for mentioning the Flickr block. I don’t use it because it is fixed width, and narrower than my text column. I want to be able to vary the width of the photo, with the default being the width of my column.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: