|
|
|
|
|
by baloki
1483 days ago
|
|
Although cool, it kind of ignores the responsive design-ness of modern websites if I’ve understood the implementation correctly? Everything seems based off knowing the exact size of the original and the new container, so if the proportions of the container change, so will the clipping? Could probably fix with a lot of breakpoints and the like, but it feels like it would be better generating a cropped version of the image beforehand instead of using this. |
|
But yes, since you already know the possible proportions and sizes you want to resize/crop/scale etc. on the server, and deliver the correct image via a picture element. The browser then fetches exactly what it needs.
This css property is however useful if you want something more dynamic and you don’t know or don’t care to know beforehand how the image will be cropped.