• Hi –

    Running WordPress 4.9.1. Starting on a new post, blank page. Click “Add Media”, select a picture and make it a thumbnail, left align. Expected behaviour is to start typing, and see text appear on the right of the image. This is now not happening.

    So switch to “Text” mode and I see my image info is missing the [caption][/caption] tags. For example:

    <a href="IMG_4864.jpg"><img class="alignleft size-thumbnail wp-image-4648" src="IMG_4864-150x150.jpg" alt="" width="150" height="150" /></a>
    

    I opened another post I had written previously and I see an image working properly. This time the code looks like this:

    [caption id="attachment_4608" align="alignleft" width="150"]<a href="IMG_4835.jpg"><img class="wp-image-4608 size-thumbnail" src="IMG_4835-150x150.jpg" alt="" width="150" height="150" /></a> "Image description"...[/caption]
    

    As you can see there is a difference. The caption information is missing. What happened? Is this a known bug?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Does the image in the first example have a caption when viewed in the media selector?

    Thread Starter bowtie6

    (@bowtie6)

    Thank you for your reply Steve.

    In answer to your question: it did not have a caption. But, I went back, and added a caption by clicking on the image and selecting the edit icon, then saved it.

    Now the syntax looks something like this:

    [caption id="attachment_4648" align="alignleft" width="150"]<a href="IMG_4864.jpg"><img class="wp-image-4648 size-thumbnail" src="IMG_4864-150x150.jpg" alt="" width="150" height="150" /></a> Test caption[/caption]
    

    By adding a caption, the rest of the missing syntax gets added in. If you scroll to the right, you will see the image is the same. Of course, the “attachment” number is different.

    HOWEVER, this is new behaviour. Used not to have to add a caption to make the tags show up.

    • This reply was modified 6 years, 11 months ago by bowtie6.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I don’t think so; it seems to me it’s worked like that for a long time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[caption][/caption] tags missing when inserting a thumbnail on a post’ is closed to new replies.