• Resolved danielo83

    (@danielo83)


    Hi,
    there’s a way to add dinamically the title of article in the social image?

    Thank you ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Internetbureau Clearsite

    (@clearsite)

    Hi there danielo83,

    Thanks for trying out our plugin. By default it should add the title of a page on the Open Graph image. Please let me know if this is not the case on your installation. And maybe provide us with an url of a page where this doesn’t seem to work?

    Regards,
    Clearsite

    Thread Starter danielo83

    (@danielo83)

    Hi Clearsite,
    the website is in a test area, if you want I can send you the access password in private.
    I paste the debug information of the article here. It is an article complete with text, meta, title and image, but the page title does not automatically appear above the opengraph image ??
    Thank you

    BSI Debug log for https://test.caffeaiello.it/ricette/riduzione-al-caffe-ricetta/social-image.png/
    Wed, 03 Nov 2021 14:56:21 +0000
    Selected post_id: 41444
    Image consideration: meta; no image found
    Image consideration: Yoast SEO; no image found
    Image consideration: WordPress Featured Image; 41779
    Image determination: ID before filter  bsi_image; 41779
    Image determination: ID after filter  bsi_image; 41779
    Image selected: 41779
    Caching disabled because of debug=BSI flag
    Base URL: https://test.caffeaiello.it/wp-content/uploads
    Base DIR: ABSPATH/wp-content/uploads
    Lock File: ABSPATH/wp-content/uploads/bsi-uploads/41779/41444/social-image.png.lock
    Cache File: ABSPATH/wp-content/uploads/bsi-uploads/41779/41444/social-image.png
    Source: trying image size "og-image" for 41779
    Source: found: W: 945, H: 630, U: https://test.caffeaiello.it/wp-content/uploads/2021/03/ricetta-riduzione-caffe.jpg, F: ABSPATH/wp-content/uploads/2021/03/ricetta-riduzione-caffe.jpg
    Source: found: Filepath: ABSPATH/wp-content/uploads/2021/03/ricetta-riduzione-caffe.jpg
    Logo overlay: enabled
    Overlay: logo
    Logo overlay: logo file; ABSPATH/wp-content/uploads/2020/08/favicon.png
    Logo overlay: logo dimensions; W:1200, H:630
    Text overlay: enabled
    Text setting: default text; ( no text )
    Text: no text detected in meta-data, getting text from page;
    Text: No text found, using default; 
    Text determination: text before filter  bsi_text; ( no text )
    Text determination: text after filter  bsi_text; ( no text )
    Text overlay: using font: ABSPATH/wp-content/uploads/bsi-uploads/Oswald-Bold.ttf
    - end log -
    Plugin Author Internetbureau Clearsite

    (@clearsite)

    this is a nice clue:

    Text: no text detected in meta-data, getting text from page;
    Text: No text found, using default;

    I think it has to do with your website being password protected.
    Can you tell me which plugin you are using for that? we’ll try to replicate the problem.

    ^RP

    Thread Starter danielo83

    (@danielo83)

    Thank you!
    I think that it was the issue ??

    Now, on another website (online), I can see it ??

    BSI Debug log for https://www.cosenzapp.it/calabria/freaks-out-a-cosenza-lincontro-con-regista-gabriele-mainetti/social-image.png/
    Wed, 03 Nov 2021 15:12:19 +0000
    Selected post_id: 425832
    Image consideration: meta; no image found
    Image consideration: Yoast SEO; no image found
    Image consideration: WordPress Featured Image; 425833
    Image determination: ID before filter  bsi_image; 425833
    Image determination: ID after filter  bsi_image; 425833
    Image selected: 425833
    Caching disabled because of debug=BSI flag
    Base URL: https://www.cosenzapp.it/wp-content/uploads
    Base DIR: ABSPATH/wp-content/uploads
    Lock File: ABSPATH/wp-content/uploads/bsi-uploads/425833/425832/social-image.png.lock
    Cache File: ABSPATH/wp-content/uploads/bsi-uploads/425833/425832/social-image.png
    Source: trying image size "og-image" for 425833
    Source: found: W: 1120, H: 630, U: https://www.cosenzapp.it/wp-content/uploads/2021/11/coverlg_home.jpg, F: ABSPATH/wp-content/uploads/2021/11/coverlg_home.jpg
    Source: found: Filepath: ABSPATH/wp-content/uploads/2021/11/coverlg_home.jpg
    Logo overlay: enabled
    Overlay: logo
    Logo overlay: logo file; ABSPATH/wp-content/uploads/2019/04/logo_cosenzapp2017.png
    Logo overlay: logo dimensions; W:1200, H:630
    Text overlay: enabled
    Text setting: default text; ( no text )
    Text: no text detected in meta-data, getting text from page;
    Text: og:title detected; “Freaks Out”, a Cosenza l’incontro con regista Gabriele Mainetti
    Text determination: text before filter  bsi_text; “Freaks Out”, a Cosenza l’incontro con regista Gabriele Mainetti
    Text determination: text after filter  bsi_text; “Freaks Out”, a Cosenza l’incontro con regista Gabriele Mainetti
    Text overlay: using font: ABSPATH/wp-content/uploads/bsi-uploads/Roboto-Bold.ttf
    - end log -
    Plugin Author Internetbureau Clearsite

    (@clearsite)

    Oh, I see now it is behind a “basic auth”…

    You could try something like this;

    
    <?php
    add_filter('http_request_args', function($passed_args, $url) {
    	$my_host = parse_url(get_bloginfo('url'), PHP_URL_HOST);
    	if (false !== strpos($url, '://'. $my_host)) {
    		if (empty($passed_args['headers'])) $passed_args['headers'] = [];
    		$passed_args['headers']['Authorization'] = 'Basic '. base64_encode('username:password');
    	}
    	return $passed_args;
    }, 10, 2);

    of course, use the correct username and password ??
    this should make the requests use the authentication (but only when requesting urls on your own website, of course)

    *) this should never be used nor be needed on a live website!

    Thread Starter danielo83

    (@danielo83)

    <3 Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Dynamic title on image’ is closed to new replies.