Viewing 15 replies - 1 through 15 (of 39 total)
  • Plugin Author George Notaras

    (@gnotaras)

    Hi,

    Thanks for your feedback.

    Please take a look at this post of mine, which describes how to override all images of the post.

    I’ve received several requests about such a features and I’ll see how it can be implemented so that the user can easily configure the plugin to generate metadata only for the featured image.

    Kind Regards,
    George

    Thread Starter reypm

    (@reypm)

    I think that answer doesn’t fix my issue at all. I need to set og:image to use featured image and only this image, if there is not featured image for the post then will use the default page logo or any other image that users will be able to upload, that will be awesome, can you do that or tell me how to achieve this?

    Plugin Author George Notaras

    (@gnotaras)

    The ‘Global image override’ field accepts a URL, which overrides all other images attached to or embedded in the post. This URL can be any image URL you see fit, either the URL of the featured image or the URL of an attached image or the URL of a totally different image that does not exist in the content.

    It offers the maximum flexibility, but the only downside is that you have to enter the image URL manually. I understand this can be a bit inconvenient. I’ll see what can be done.

    George

    Plugin Author George Notaras

    (@gnotaras)

    I’ll reply with more details and possible solutions within the weekend.

    Kind Regards,
    George

    Thread Starter reypm

    (@reypm)

    Perhaps I am not following you at all, you said the plugin will use featured image by default and having “Global image override” with some URL will omit the rest of og:image tags?

    Plugin Author George Notaras

    (@gnotaras)

    No. By default the plugin will generate metadata for:

    1) *all* images that are attached to the post (featured and those within the content)
    2) *all* embedded images (currently only flickr images are supported)

    If an image URL is entered in the “Global image override” field, then the generation of metadata for all the above images is omitted and the plugin treats the image URL of the “Global image override” field as the only image of the post. There is no limitation of what URL you use in the “Global image override” field. This is up to the user.

    I hope this is clarified now. If not, please feel free to ask for more clarification.

    George

    Plugin Author George Notaras

    (@gnotaras)

    I intend to add an extra setting that limits the generation of image metadata to one image only. Please note that it might take some time before this feature is implemented.

    George

    Plugin Author George Notaras

    (@gnotaras)

    Currently, here is what you need to do in order to limit the generation of metadata to the featured image, regardless of the number of images that have been attached to the post:

    1) Set a featured image to the post.
    2) Enter the featured image’s URL to the “Global image override” field.

    George

    Thread Starter reypm

    (@reypm)

    Yes, it is more clear plugin not works as I need and want as far as I can see from your explanation above so I am asking for a modification from your side or mine – through a function or some code or hook or something else if it’s possible of course.

    Suppose you or anyone has a post with several images plus the featured image, by default the plugin add a og:image tag for each image on that post, right?

    If I set “Global image override” in config then plugin will omit all the images on the post and use the one configured at that field, right?

    Ok, what I need and I am proposing is:

    – if I do not choose and setup “Global image override” then use just the featured image and set og:image with that attribute – do not add a og:image attribute for each image on the post just one for the featured one

    – if post miss featured image then you can write something to put a default image – I think this is the same than “Global image override” but without need to mark that option and also not working in the same way as you have now

    Did you get my concerns and points?

    Thread Starter reypm

    (@reypm)

    Thx for your answers ??

    This

    2) Enter the featured image’s URL to the “Global image override” field.

    is per image or it is general for the whole blog? If it is for the blog will not works since it will overrides all post images and I don’t want that either

    Plugin Author George Notaras

    (@gnotaras)

    Thanks for your detailed feedback. I intend to to make it configurable to limit the image metadata to one image. The plugin already tries to find images in the following order:

    1 – Image URL in ‘Global Image Override’. If a URL has been set, no other images are queried.
    2 – Featured image
    3 – Attached images in the content
    4 – URL of the default image, as it has been set in the Add-Meta-Tags settings.

    The implementation of the 1-image limit will make the plugin work the way you want.

    Plugin Author George Notaras

    (@gnotaras)

    2) Enter the featured image’s URL to the “Global image override” field.

    is per image or it is general for the whole blog? If it is for the blog will not works since it will overrides all post images and I don’t want that either

    This can be set on a per post basis. Enable the ‘global image override’ metabox feature in the settings. The field exists in the ‘Metadata’ box in the post editing screen.

    George

    Plugin Author George Notaras

    (@gnotaras)

    I guess we have covered all aspects of this feature request. I’ll try to implement it soon. Some other features currently have higher priority, so I cannot give an ETA. Thanks for your understanding.

    Best Regards,
    George

    Thread Starter reypm

    (@reypm)

    Thx George, that are really good news, I am not an WordPress expert and have a lot to learn but know PHP and OOP and others like Symfony2, Laravel and so on so if you need my help in something just feel free to ping me.

    Now regarding the new feature I come with another suggestion for you and I would try this before do anything else – meaning add new code. As you can see in this post at SO I have got a reply related to no display images at Google+ post: https://stackoverflow.com/a/31350004/719427 take a look to it, is something related to featured image size.

    What comes to my mind if to add a filter for crop images before set them as og:image and perhaps this will solve the issue. If you tell me how, I can try and see if that works, otherwise I will need to wait until you can

    Again, thx for your support is amazing

    Plugin Author George Notaras

    (@gnotaras)

    Hi, I also thank you for your feedback.

    What comes to my mind if to add a filter for crop images before set them as og:image and perhaps this will solve the issue. If you tell me how, I can try and see if that works, otherwise I will need to wait until you can

    Adding image management functionality like cropping or adding a new image size is outside the scope of the plugin. However, it is possible to configure the image size that is used by Add-Meta-Tags by adding the following code to the functions.php file of the theme:

    function amt_use_full_image_size_in_all_meta_tags( $size ) {
        return 'myimagesize';
    }
    add_filter( 'amt_image_size_index', 'amt_use_full_image_size_in_all_meta_tags', 10, 1 );
    add_filter( 'amt_image_size_content', 'amt_use_full_image_size_in_all_meta_tags', 10, 1 );
    add_filter( 'amt_image_size_attachment', 'amt_use_full_image_size_in_all_meta_tags', 10, 1 );

    This code requires that an image size named ‘myimagesize’ has already been configured for your web site.

    If you need more help, please let me know.

    George

Viewing 15 replies - 1 through 15 (of 39 total)
  • The topic ‘How to set featured image as og:image tag’ is closed to new replies.