• Resolved wdes2021

    (@wdes2021)


    Hello,

    I have an issue with using AIOSEO with ACF.

    Testing with Twitter, I select this option under Image Source: Image from Custom Field.

    I specified the custom field name (checked it about 10 times) and everytime I test it out, the image never gets displayed in Twitter. If I switch to a different Image Source, for example Feature Image, then it works.

    Within AFC I have the return format for my custom field as Image URL. I also tried Image ID to see if for some reason that would work, but it didn’t.

    I am missing something? This should be pretty straight-forward!

    Thanks,

    WDES

    • This topic was modified 3 years, 6 months ago by wdes2021.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter wdes2021

    (@wdes2021)

    I also did an additional test, which is also failed.

    I added another custom field simply with the type of URL. I put the URL of the image in that field and that also didn’t work. I tried again with the type of TEXT and again that also didn’t work.

    I’m curious how anyone got the “Image from Custom Field” source to work using ACF?

    Thanks,

    WDES

    Plugin Support Steve M

    (@wpsmort)

    Hi @wdes2021, I tested with a text field and a URL field in ACF and both worked fine as I’d expect. It doesn’t work with an Image field due to the way ACF stores that data in the database.

    Are you looking at the twitter:image meta tag in the source code of your post because that’s absolutely working for me.

    Thread Starter wdes2021

    (@wdes2021)

    @wpsmort I was hoping you’d respond!

    RE: It doesn’t work with an Image field due to the way ACF stores that data in the database.

    Yeah I saw in an earlier post that you closed it out and moved it over to a feature request. That sure would be nice!

    RE: Are you looking at the twitter:image meta tag in the source code

    I just checked the source code and confirmed it looks right:
    <meta name=”twitter:image” content=”correct.png”/>

    I then went back to the Twitter Card Validator and sure enough, it shows up! I’m assuming it just needed time?? I thought it would be instant, I read by going to the Twitter Card Validator, by putting the URL it would clear the cache. Anyways, all good now!

    So my setup is that in my post editor page, I have an Image selector custom field using ACF and a URL Custom Field below it. I’m trying to see if I can automate the URL Custom Field to automatically retrieve the URL from the image using some logic… This would be a nice workaround.

    Thanks Steve!!

    WDES

    Plugin Support Steve M

    (@wpsmort)

    Hi @wdes2021,

    Twitter, like all other social media networks, grabs the first image it finds and pre-caches that for 7 days. After that, they crawl the post/page again looking to see if you’ve set the twitter:image or og:image meta tag and then they’ll use that.

    Here’s what they say about this – https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/troubleshooting-cards#refreshing_tags

    I always recommend setting your Twitter and Open Graph markup when your content is still in draft status and then as soon as you publish, go to the Card Validator and run the URL through there. That usually works for me and avoids the pre-caching of images.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Social Image from Custom Field Name not working’ is closed to new replies.