[Resolved] Link to media file

Home Forums Support [Resolved] Link to media file

Home Forums Support Link to media file

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2305365
    Bernhard

    Hello,
    is there a simple way to set the link to media file in the new image block?

    It’s because I start to substitute the WP image block with the GP image block and all other settings like padding, image size on different devices etc I can simply copy and paste but I do not find how to set the link to media file, beside inserting the image URL one by one.

    #2305639
    David
    Staff
    Customer Support

    Hi there,

    select the GB Image Block, enable the Dynamic Data options, and set:

    Data source: Current Post ( default value)
    Image source: do not select anything
    Link source: Single Image

    #2305767
    Bernhard

    Hi David,
    this works so far, thank you :).

    There is a little problem: when “dynamic data” is switched on, in the image block settings section the fields alt text and title attribute disappear. Looking into the code editor, the tags are there.

    #2306352
    Fernando
    Customer Support

    Hi Bernhard,

    Yes, they disappear by default if dynamic data is enabled. The alt text is dynamically taken from the image meta.

    #2307256
    Bernhard

    Hi Fernando,
    I made now a test and I see the title tag in the editor, but when the post is published it shows “post name image number”.
    In the first grid are 3 dynamically addressed posts, in the second grid a query.
    https://imgur.com/a/3FlukBA

    #2307618
    David
    Staff
    Customer Support

    If you check the Image in the Media Library – does it contain any values for the alt and title there ?

    #2307686
    Bernhard

    Hi David,
    yes, you can see in the screenshot made with the Gutenberg editor, when hovering over the images the title tags pop up.

    #2308143
    Bernhard

    I checked with the developer tools and the alt tag is there but the title tag is missing. Maybe that’s the way it’s meant to be. I disabled now in Rankmath the option to substitute missing title tags and it’s ok for me now. Nothing pops up on hover over the image.
    Thank you for your help 🙂

    #2308730
    David
    Staff
    Customer Support

    Thanks for letting us know.
    I’ll take a look into the missing Title Tag, and whether its something we should add a filter for.

    Glad to hear its working as you require it!!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.