Basic blog setup using Wygwam for the primary field in the entry. Inside the file management, I have Image Manipulations set to manipulate any images uploaded and used formatted for social media. For instance, since the twitter images for twitter card data must be at least 280x150, I just create better optimized images for them and they are dumped in a sub-folder of images named "_Twitter_Card_Image".
Is there any way to find if an entry has an image in the Wygwam field and add a META tag for each image used?
Something like:
{wygwam-field}
<meta name="twitter:image:src" content="{twitter-image-location}">
{/wygwam-field}
I've never done this before. It may be something pretty simple that I'm over thinking.
* EDIT *
Sorry, I should have been more clear. (Trying to post and answer questions when people walk up.)
I know of the images only tag. I wasn't exactly clear about the needs. I need the alternate image source for the Image Manipulation option spoken of above.
{my_wygwam_field images_only="yes"}
<meta name="twitter:image:src" content="{twitter-image-location}">
{/my_wygwam_field}
* UPDATE *
<!-- Twitter summary card with large image must be at least 280x150px -->
{app_primary_copy images_only="yes"}
<meta name="twitter:image:src" content="{exp:low_replace find='/appraisers/' replace='/appraisers/_Twitter_Card_Image'}{src}{/exp:low_replace}">
{/app_primary_copy}
<!-- Open Graph data -->
<meta property="og:title" content="{title}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{current_url}" />
{app_primary_copy images_only="yes"}
<meta property="og:image" content="{src}" />
{/app_primary_copy}
<meta property="og:description" content="{exp:eehive_hacksaw chars = '150' append = '...'}{app_primary_copy}{/exp:eehive_hacksaw}" />
So the hacksaw info comes in just fine, but the rest of the info that's wrapped in EE Tags is completely blank. Basically, the wygwam tags aren't producing any results. No HTML or anything. It's like there is nothing there at all.