Hello there
look at the screenshot please (from iphone 4), the image is stretched in length.
http://yadi.sk/d/wXrxfTIFEyGfx
desktop version is OK:
http://yadi.sk/d/HQ1Sx9sxEyHuB
could you please help me to fix it?
Thanks!
Hi Riddick,
To resolve image issue when you view on the mobile. Please log in to Dashboard > Theme > Customize > Custom Code then add the following code to the ” Header Code”
<style>
.single-post .entry-content img {
height: auto !important;
}
</style>
thanks for quick reply,
do you mean by “Custom Code” the “DW Header script” ?
DW Header script is empty by default.
or should I add the code to header.php?
anyway I’ve tried both. and it works fine in desktop browser only, img is ok when I scratch the window.
but image issue remains the same on iPhone 4G (safari) and I’ve tried on Galaxy Note (chrome)
Hi Riddick,
You can open up the functions.php file in themes/dw-fixel folder, and remove the following code (somewhere at bottom of the file):
if( ! function_exists('dw_remove_thumbnail_dimensions') ) {
function dw_remove_thumbnail_dimensions( $html ) {
$html = preg_replace( '/<img([^>]*)width=\"(\d*)\"([^>]*)height=\"(\d*)"([^>]*)\/>/', '<img $1 $3 $5 style="width:$2px;height:$4px;"/>', $html );
return $html;
}
add_filter( 'the_content', 'dw_remove_thumbnail_dimensions' );
}
Hope that helps!
yes, that helps!
many thanks!
Please login or Register to submit your answer