stefanledin on "[Plugin: Responsify WP] size"

ساخت وبلاگ

josephconlon
Member
Posted 21 hours ago #

Using native mode. The img src is using the 460px width instead of a larger one, so it displays incorrectly on IE. Want to use the 1200px width image here. Is there a way to change this?

Link here: http://bit.ly/29oMW0J

https://wordpress.org/plugins/responsify-wp/

Hi josephconlon!
Inteet explorer doesn't support the srcset attribute, so you'll need to tu of the native mode and use the Picturefill polyfill.

http://caniuse.com/#feat=srcset

josephconlon
Member
Posted 12 hours ago #

That's ok, but it's more the fact that although the images load, they are loading the 460px wide image. Is there any way to make the img src load the larger size image? We want to use native mode and aren't bothered about the srcset but the img src is loading the small image.

I'm afraid not. The image in src is supposed to be the default/smallest one. The srcset attribute should contain alteative images for the browser to chose from, like larger/retina images.

josephconlon
Member
Posted 40 minutes ago #

OK. Is there no way to modify native-element.php to do this? (a hack I know but the client wants the large image as the src)

No, but in native-img.php :)
https://github.com/stefanledin/responsify-wp/blob/master/includes/native-img.php#L9
$this->images contains all available image sizes. It's the first one (the smallest) in the array that is included in the src attribute. Maybe you could change it to the last one in the array instead?

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 256 تاريخ : شنبه 19 تير 1395 ساعت: 4:07