Title: add data attribute
Last modified: December 18, 2021

---

# add data attribute

 *  Resolved [sergio85](https://wordpress.org/support/users/sergio85/)
 * (@sergio85)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/add-data-attribute/)
 * Hi, my name is Sergey!
    I am developer and I work on this website: [https://www.purehimalayanshilajit.com/](https://www.purehimalayanshilajit.com/)
   I use your plugin in menu slider [https://prnt.sc/23jgzcx](https://prnt.sc/23jgzcx)
   my question is: how i can add this. attribute data-no-lazy=”1″ for images, which
   I was add from your plugin? [https://prnt.sc/23jhh4f](https://prnt.sc/23jhh4f)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadd-data-attribute%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15178835)
 * Hi [@sergio85](https://wordpress.org/support/users/sergio85/),
 * I can’t open your screenshot links properly. Can you place new screenshot links?
   
   Thanks
 *  Thread Starter [sergio85](https://wordpress.org/support/users/sergio85/)
 * (@sergio85)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15180497)
 * Hi, sure!
 * [https://prnt.sc/23pimmh](https://prnt.sc/23pimmh)
    [https://prnt.sc/23piq1t](https://prnt.sc/23piq1t)
 * and from other service
    [http://joxi.ru/1A5eR3xszMe88A](http://joxi.ru/1A5eR3xszMe88A)
   [http://joxi.ru/BA0eaL0svEejXr](http://joxi.ru/BA0eaL0svEejXr)
 * all right now ?
 * Thanks
    -  This reply was modified 4 years, 5 months ago by [sergio85](https://wordpress.org/support/users/sergio85/).
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15181550)
 * Thanks. There is one filter that you can use.
 * The filter is called `menu_image_img_html` You can manipulate the Html of the
   image and add the desired data.
 * You should add in your functions.php of your child theme the following line.
 *     ```
       add_filter( 'menu_image_img_html' ,  'my_custom_menu_image_data', 10, 1 );
   
       function my_custom_menu_image_data( $image){
   
       // Manipulate $image and add the custom data
   
       // return the image HTML
       return $image;
       }
       ```
   
 * Hope it helps.
 *  Thread Starter [sergio85](https://wordpress.org/support/users/sergio85/)
 * (@sergio85)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15182688)
 * Thanks you! I will try
 *  Thread Starter [sergio85](https://wordpress.org/support/users/sergio85/)
 * (@sergio85)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15188748)
 * Hi
    It is works!
 * Thanks very much!
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15261331)
 * That’s great. I’m glad it’s working.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘add data attribute’ is closed to new replies.

 * ![](https://ps.w.org/menu-image/assets/icon-128x128.png?rev=2123398)
 * [Menu Image, Icons made easy](https://wordpress.org/plugins/menu-image/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/menu-image/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/menu-image/)
 * [Active Topics](https://wordpress.org/support/plugin/menu-image/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/menu-image/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/menu-image/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/add-data-attribute/#post-15261331)
 * Status: resolved