I am currently facing an issue where I need to display the image title when the image is broken or cannot be found in the specified path.
At the moment, I only have the options to either hide the image completely or replace it with a default image.
$('img').on("error", function() {
$(this).attr('src', '/images/missing.png');
});
// Alternatively, hide them
$("img").on("error", function() {
$(this).hide();
});
However, these solutions do not meet my requirements. If anyone has any ideas on how to display the image title when the image is broken using JavaScript or jQuery, I would greatly appreciate your assistance.