Article Preview using incorrect image


I have an article with
  1. A gif embedded using "IMG" tags
  2. An image uploaded as an attachment
The images are displayed in the article in that order. Therefore, the first gif should be used as the article image according to:

which currently fetches the first embedded image from the article, whether that be hot linked with an "IMG" tag, or directly attached

Yet it always uses the last attachment image. What am I missing?

Just had a chance to check this out. To clarify it is always using the first embedded attachment image. There was a GIF attached to the post but it wasn't embedded so that wasn't included.

I've modified it now and the GIF is now the first embedded attachment and that displays the GIF as the article image:


But there is potentially a bug here. The code is structured in such a way where it prefers embedded attachments (in [ATTACH] tags) and it will always use them if they are available. It will only fallback to images used in [IMG] tags if there are no attachments.

I'll have to think back on whether this was intentional or desirable for a specific reason but if not then we may change this.
Top Bottom