E
E
EvgenyMorozov2018-04-04 10:22:20
css
EvgenyMorozov, 2018-04-04 10:22:20

Images are no longer responsive. How to fix?

Good afternoon. Yesterday everything was working - the pictures were adjusted to the viewport as it should. Today on mobile phones - the photo goes beyond the container and expands it. I can not find what and where I screwed up.
If you remove the inline width from figure, everything is fine, but yesterday everything was fine even with this width.
I sin that the browser selects srset incorrectly, so it loads a large image. Or not?
And this is the situation both on the dev server and in production. I looked at the commits - I can not find the reason.
Link www.gorodskievesti.ru/2018/04/03/16-etazhka-na-bulvare-yunosti-uzhe-nedelyu-zhivet-bez-liftov/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EvgenyMorozov, 2018-04-04
@EvgenyMorozov

Solved the problem by removing the automatic addition of inline width for the photo

add_filter( 'img_caption_shortcode_width', '__return_zero' );

D
Danil Isaev, 2018-04-04
@d4h1i15438

max-width: 690px for many elements

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question