• Resolved haksjdf

    (@haksjdf)


    the images I’m uploading via REST API when I mouseover it shows the gobbledygook filename, I tried setting “alt”: tag to the images in the JSON I’m sending but it still shows the filename when I mouse over, the source shows a nonstandard attribute “label=” which I think might be the cause? (this happened in both in Firefox and Safari anyway I haven’t tested other browsers)
    is there any way to disable this or change this or is this a browser thing I can’t change?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    is there any way to disable this or change this or is this a browser thing I can’t change?

    That is indeed a browser thing but it should use the alt tag.

    the source shows a nonstandard attribute “label=” which I think might be the cause?

    That sounds correct. Can we see this somewhere so we can take a look with our browser tools?

    Kind regards,

    Thread Starter haksjdf

    (@haksjdf)

    sure, and thank you:

    https://maritimetribes.com/product/ann-arbor-campus-map-blanket/

    notice alt=”” but for the main image mouseover I get tooltip style popup with long filename. I tried setting alt and name properties from woo api docs for images but ???

    Mirko P.

    (@rainfallnixfig)

    Hi @haksjdf,

    Thanks for sharing a link to your site.

    It sounds like the image title is being shown when hovering over the image. You could try to remove that by adding the below snippet found on this blog article:

    
    // Title Removal from WordPress image
    add_filter( 'wp_get_attachment_image_attributes', 'remove_image_text');
    function remove_image_text( $attr ) {
    unset($attr['title']);
    return $attr;
    }
    

    Add the code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin.

    I haven’t tested the snippet so hopefully it will work for you, but if not I would recommend visiting channels for developers like the WooCommerce Facebook Community group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thanks.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have more questions.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘disable filename on image mouseovers?’ is closed to new replies.