Support » Fixing WordPress » Images around borders in WordPress 5 (block editor)

  • Prior to WordPress 5, I could add a border around an image easily by switching to the HTML editor and adding style="border: 1px solid #ffffff" to the img tag. There was also, at least at some point although I don’t remember if it was there in the last version before WordPress 5, an advanced image properties editor you could use to edit the attributes of the image, and specify the border there.

    Now there’s no advanced image properties editor, and if I try to add a style attribute to an image the block editor complains that it doesn’t recognize what I added and wants to remove it.

    This shouldn’t be hard. I just want to add a border to a specific image in a specific blog posting. How do I do that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Miguel Angel


    you can try right clicking on the image from your website, you give inspect code and put the borders, then install a plugin editor css copies the code from your website and ready

    Thread Starter jikamens


    Yes, what I ended up doing was installing WP Add Custom CSS and adding custom CSS code to the page that references the class dedicated to the image I wanted to have a border and adds a border style attribute to it.

    It should not be that hard.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Images around borders in WordPress 5 (block editor)’ is closed to new replies.