Closed Workshopshed closed 10 years ago
Is the current filter hook, get_the_image
, not good enough to do this already?
For the situation where there is only one image and it's a tracking image then yes it's possible to use that filter and blank out the HTML so that's good for my specific issue.
I was thinking that there might also be an issue where people have a tracking image and a regular image. However I think in at least Amazon's case the "real" image always comes first so that should not be an issue.
When people use 3rd party services such as Amazon Affiliates they often have a tracking image which is a transparent 1x1 image. It there are no other images on the post get-the-image can end up picking up that image and it get's displayed as the thumbnail.
Example
<img src="http://ir-uk.amazon-adsystem.com/e/ir?t=bagpussandfri-21&l=as2&o=2&a=B00EE6C47I" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
To exclude these perhaps a filter could be used passing the URL as a parameter. Then users could specifically exclude these by returning false when there was a URL they did not want to include?