• Resolved Rick Hellewell

    (@rhellewellgmailcom)


    I’m testing the inline image part of postie, using the format #img1# (for the first image).

    The image is being placed inline, but the surrounding text is not wrapped. I am using the ‘text’ mode.

    Is there a way to specify wrapping text around images?

    The second problem is that the captions are not being displayed. I am using the format #img1 caption=’this is a caption’# . The image is inline, but no caption.

    Thanks…excellent plugin!

    …Rick…

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    You need to take a look at the image template. The easiest way is to edit a post and get an image to wrap the way you want, then use the resulting HTML as the basis for the image template.

    Missing captions are a known bug at this point.

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    I was able to add to the template (under Images) to wrap text around the pictures. They key is to add ‘alignleft’ (no quotes) inside the ‘style’ area of the template. Here’s an example.

    <a href="{PAGELINK}"><img src="{MEDIUM}" alt="{CAPTION}" width="{MEDIUMWIDTH}" height="{MEDIUMHEIGHT}" class="alignnone size-medium wp-image-{ID} alignleft " /></a>

    If two images are near enough each other inside a text area that they would not fit vertically, the ‘alignleft’ will place the 2nd image in the center, with text still wrapped.

    I suppose you could also use ‘alignright’ and ‘aligncenter’ as additional classes to wrap text around a right or centered picture.

    Perhaps something to add to the explanatory text on the “Images’ page.

    Looking forward to the caption fix.

    Thanks….Rick..

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    …and just noticed the ‘alignnone’ in the code; it might be best to take that out, although the ‘alignleft’ seems to override the ‘alignnone’ settings.

    Here’s a corrected version:

    <a href="{PAGELINK}"><img src="{MEDIUM}" alt="{CAPTION}" width="{MEDIUMWIDTH}" height="{MEDIUMHEIGHT}" class=" size-medium wp-image-{ID} alignleft " /></a>

    …Rick…

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Thanks for sharing your solution. Unfortunately there isn’t a one size fit all recommendation as the specific theme you’re using will dictate the solution.

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    OK. For those that don’t have an ‘alignleft’ in their CSS/theme, you can change the image template to something like:

    <a href="{PAGELINK}"><img src="{MEDIUM}" alt="{CAPTION}" width="{MEDIUMWIDTH}" height="{MEDIUMHEIGHT}" class=" size-medium wp-image-{ID} " style="float:left;margin-right:1em;" /></a>

    Note the placement of the

    style="float: left; margin-right: 1em;"

    outside of the ‘class’ attribute. I also used double-quotes to match the other parameters of the template. You may need to adjust the margin-right value to your needs.

    You might need to add an ‘!important’ depending on your theme to ensure that the style parameters are force-used, so it would be:

    <a href="{PAGELINK}"><img src="{MEDIUM}" alt="{CAPTION}" width="{MEDIUMWIDTH}" height="{MEDIUMHEIGHT}" class=" size-medium wp-image-{ID} " style="float:left !important ;margin-right:1em !important ;" /></a>

    These additional commands in the template should work across multiple themes. YMMV.

    …Rick…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Wrapping text around inline image and captions missing’ is closed to new replies.