samedi 29 novembre 2014

Remove width and height attributes from post image


I don't want that post image is appointed by width and height. Output at the moment:



<img src="image.jpg" alt="image" width="150" height="150" />


It must be:



<img src="image.jpg" alt="image" />


or



<img src="image.jpg" alt="image" width="100%" height="auto" />


I've tried to use the following jQuery script but it doesn't help:



$(document).ready(function(){
$('.single-page-content').find('img').removeAttr('width');
});


In addition, I'm using the following CSS code:



.content .single-page img {
max-width: 100% !important;
min-width: 100% !important;
height: auto !important;
}




Aucun commentaire:

Enregistrer un commentaire