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

    (@voltronik)

    Hi @samdobrow,
    Thanks for your message.

    It seems to be this is something that Gmail is doing with the URL of the image. Alternatively, if you’re running the email trhough an SMTP or SES service that relies on Google, then this may be causing the issue too.
    Sadly, I don’t think that’s something I can help with directly from within the plugin.

    Sorry I can’t help more but hoping the above may point you in the right direction.

    Thread Starter samdobrow

    (@samdobrow)

    From everything I can find (which is very little). It seems that when the email is created by BNFW the image can not be cached because it is from an unreachable draft post. Once the post is made public, Google doesn’t refresh the cache. Is it possible to trigger the email notifications after WordPress makes the post public? Perhaps a background job? That functionality would also improve the user experience while all the emails are being generated.

    • This reply was modified 1 year, 3 months ago by samdobrow.
    Plugin Author bnfw

    (@voltronik)

    Hi @samdobrow,

    Hmm. BNFW shouldn’t be triggering on a draft post at all.
    Can you tell me which notification(s) you’re using that are causing the issue?

    Thread Starter samdobrow

    (@samdobrow)

    I’m using the new post trigger. I’m thinking it starts before WordPress commits its post process. It takes several seconds after the publish button is clicked before the send emails are complete and control returns to the user interface. I’m thinking that your hook initiates before the post is committed thereby changing the post status to published after the emails go out. In those few seconds Google can’t see the linked image and caches an empty image. Then Google never refreshes the cache and the image link is empty for all recipients who use Gmail. Generally it’s a Google bug but perhaps there is a better way to implement the email hook.

    Plugin Author bnfw

    (@voltronik)

    Hi @samdobrow,

    BNFW uses the wp_insert_post hook, along with a few transition hooks, such as draft_to_publish, which fires as the post is being inserted into the database. I haven’t had any other issues regarding images, and how the core plugin itself functions has gone largely unchanged for many years.

    Something that might be worth investigating is how Google is indexing your site and discovering images. It’s possible that something is preventing it from caching them and you’re seeing some kind of after effect via the emails.
    Let me know if this highlights anything – would be interested to know myself.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Broken Image Links in Gmail’ is closed to new replies.