How to set og:image to be that of the watermarked image

Hi All,

I hope someone can help me.

On my gallery for an image page eg

http://spoilertv.co.uk/images/new-girl/Season 2/Cast Promotional Photos/crng_05-group-blue-wall_1226_jw1a3a.jpg.php

I set the og:image so that I can use it for things like G+, FB and pinterest sharing.

However the og:image is being set to the actual image

http://spoilertv.co.uk/images/albums/new-girl/Season 2/Cast Promotional Photos/crng_05-group-blue-wall_1226_jw1a3a.jpg

However we don't allow hotlinking so the image will no share.

What I need is for the og:image to be set to our watermarked/cached image

http://spoilertv.co.uk/images/cache/new-girl/Season 2/Cast Promotional Photos/crng_05-group-blue-wall_1226_jw1a3a_595_watermark.jpg

Is there a variable that I can use in my template that contains the watermarked/cached image url that I can then use to set og:image?

Many thanks in advance.

Comments

  • acrylian Administrator
    The html_meta_tags plugin uses the thumbnail which is cached if enabled. However on G+ it does not seem to work somehow, at least not on our page.

    You can of course always code that manually. See the object model and template functions.
  • Thanks acrylian.

    I'm using the FBSuite plugin which sets the OG: variables for me.

    What I need is to replace this line

    echo '<meta property="og:image" content="http://' . $_SERVER['HTTP_HOST'] . getUnprotectedImageURL() . '" />';

    It seems to be using the getUnprotectedImageURL() which is not what I want. Is there a simple function similar to getUnprotectedImageURL() but for the cached image?
  • yeah that would be the part in the fbcommon to update.

    Try the below:
    `
    echo '';
    `
    When I get the time to touch up the plugins again (hoping very soon), I'll probably add that as a switch set by options, makes sense.
  • Awesome, that worked a treat :)
Sign In or Register to comment.