A
A
Alexander Tartmin2014-12-13 14:08:20
css
Alexander Tartmin, 2014-12-13 14:08:20

How to display images of different sizes so that they look the same?

I have a set of images (movie posters). These pictures are of different sizes in height and width. On the page, I use the bootstrap grid. The essence of my problem is this: I need the pictures to be automatically resized (cropping is allowed) and become the same in height and width. It also needs to be adaptable. 178.62.89.68:3000/home here you can see exactly what my problem looks like. Thanks in advance for ideas :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FanKiLL, 2014-12-13
@FanKiLL

Bootstrap has a class that
will make you responsive

P
Pavel Radkov, 2014-12-19
@paulradzkov

https://code.google.com/p/resize-crop/ - try trimming them with a script. (don't know how it works with responsive content)
The second option is to make the covers background with background-size: cover. But in this case, the covers will not be indexed as images, and this will reduce the "accessibility" of the site.

L
Lenok_amb, 2021-06-27
@Lenok_amb

Write in styles
img{
object-fit: cover;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question