How to add data attribute to all images in posts [closed]

You have a number of options.

You could use the add_filter( 'the_content', 'add_data_attributes' );
And after that find the images attached to the post.

Or you can use the image_send_to_editor filter more here.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)