Photos don't load on Facebook

  • Hi, we use Joomla 3.10.2 and JoomGallery 3.5.1 and we publish the Galleries link on Facebook and Twitter, but it hasn't been working properly anymore. No image uploads to Facebook /Twitter post.

    We use the VM OG Meta Tag plugin for this and in the articles on the site the images are correct, the problem is in JoomGallery.

    What should we do so that Facebook/Twitter loads an image from the gallery correctly?

    Thanks.

    Website link http://jornalolourenciano.com.br/

    • Offizieller Beitrag
    Zitat
    Picks correct image from VirtueMart Category Page or Product Details Page.
    Zitat
    Picks correct image from Joomla Articles.

    This is from the developers website: https://www.virtueplanet.com/extensions/vm-og-meta-tag


    The plugin doesnt pick up images from JoomGallery only from VirtueMart and Articles. Therefore the open graphes are not generated for JoomGallery by this plugin.


    You would need a open graph plugin that works with JoomGallery.

  • Thanks for answering

    I installed the other plugins, Dynamic Open Graph Tags, Phoca Open Graph, VM OG Meta Tag and TAGZ Open Graph, still with problems.

    So I took screenshots of your demo and yes, correct. This problem is nowhere, all sites work except the Gallery, which still has no solution.

    • Offizieller Beitrag

    If there is no plugin who is able to add the necessary meta tags for JoomGallery views, you need to add them by hand by creating template overrides of the views you would like to have open graphes available.


    In the german JoomGallery forum we already posted the code needed to add the open graphes meta tags:

    Kategorie-Anzeige in Facebook

  • I added the code at the end in the files below. But it didn't. Trying everything and still having problems, joomla is hard to use.

    public_html/components/com_joomgallery/views/mini/tmpl/default_images.php
    public_html/components/com_joomgallery/views/category/tmpl/default_images.php


    in the Facebook Share Debugger

    in the Facebook Share Debugger

    Image Too Small: ...., was not valid because it did not meet the minimum size limitation of 200 by 200 pixels.

    Missing properties

    The following two mandatory properties are missing: og:url, og:type, og:description, fb:app_id

    Using Visualshaper_helix3 - Pattern Updated Theme

    • Offizieller Beitrag

    You cant just copy and past the code for every view. You need to adjust it depending on the view you like it to have.


    Why do you add open graphes to the mini view but not to the detail view?

    Which views do want to have open graphes?

    Maybe we can tell you tgen which files you need to override...

  • Well, it's the Gallery Thumbnails that are posted on Facebook, he should take one of them the first maybe and upload it to the Post. He's getting titles and everything else right but the thumbnail.

    I did a test by opening a popup image, copied the image link and posted it on Facebook, it uploaded correctly, perfect.

    The problem is with the Gallery thumbnails, Facebook cannot find any images.

    Take a test if you want from this gallery https://jornalolourenciano.com…m-dia-2-fotos-roni-coelho.

    • Offizieller Beitrag

    Hi,


    in the Facebook Share Debugger

    Image Too Small: ...., was not valid because it did not meet the minimum size limitation of 200 by 200 pixels.

    This means that the thumbnails must be larger than 200 x 200px.

    Your thumbnails only have a size of 133 x 88 px.


    Take a test if you want from this gallery...

    This linked page does not contain any open graph tags.


    Regards

    MrMusic

  • Well then I don't know what the problem is. You set much larger thumbnails and if Facebook doesn't think it's a Joomgalery error since everything is up to date, the theme isn't the cause or Joomla. It worked fine and not anymore. Let's see a future update.


    Thank you for your dedication to helping.

  • The code had gotten in a Joomla Group and I believe it is the same below. I have now added, Exactly like below, at the end of the document./domains3/******/public_html/components/com_joomgallery/views/category/tmpl/default_images.php.

    As I said it worked correctly, it's a great component, but now it only takes an image of the website's logo or an advertisement. The site is linked above and unfortunately I can't solve it, there are openGraph plugins active in Joomla, K2 works perfectly with them. If it's a plugin, it's complicated which one would cause it. I don't want to be so annoying to your team.


    defined('_JEXEC') or die('Direct Access to this location is not allowed.');

    $doc = JFactory::getDocument();

    $doc->setMetaData('og:image', $this->images[0]->thumb_src, 'property');

    $doc->setMetaData('og:image:secure_url', $this->images[0]->thumb_src, 'property');

    $doc->setMetaData('og:image:alt', $this->images[0]->imgtitle, 'property');

    $doc->setMetaData('og:title', $this->category->name, 'property');

    $doc->setMetaData('og:description', $this->category->description, 'property');

    if($this->_config->get('jg_anchors')): ?>

    <?php endif;

  • The problem was solved thanks to the help of MrMusic. Thank you so much for taking the time, I am grateful.

    I'll leave the attached code here for others to use if they have something like that.



    defined('_JEXEC') or die('Direct Access to this location is not allowed.');


    $doc = JFactory::getDocument();

    $uri = JURI::getInstance();

    $ambit = JoomAmbit::getInstance();


    $doc->setMetaData('og:title', $this->category->name, 'property');

    $doc->setMetaData('og:type', 'article', 'property');

    $doc->setMetaData('og:url', $uri->toString(), 'property');

    $doc->setMetaData('og:image', $ambit->getImg('img_url', $this->images[0]), 'property');

    $doc->setMetaData('og:image:secure_url', $ambit->getImg('img_url', $this->images[0]), 'property');

    $doc->setMetaData('og:image:alt', $this->images[0]->imgtitle, 'property');

    $doc->setMetaData('og:image:type', 'image/jpeg', 'property');

    if($this->category->description)

    {

    $doc->setMetaData('og:description', $this->category->description, 'property');

    }

    else

    {

    $doc->setMetaData('og:description', $this->category->name, 'property');

    }

    $doc->setMetaData('fb:app_id', 'xxxxxx', 'property');

    • Offizieller Beitrag

    I'll leave the attached code here for others to use if they have something like that.

    Thanks for sharing this.


    However, a few hints should be given, because each page has its own requirements.

    • og:image:type: The value depends on the type of image used. Below I have included a code where this is automatically determined.
    • og:image:secure_url: should be used if the page is accessible via https. Otherwise you can leave it out.
    • fb:app_id: Here, of course, each user must enter their own ID.
    • To have a 'good' valid image URL you should set the following option in the configration manager to 'yes':
      General Settings >> Paths and directories >> Use real paths