my app puts images uploaded by the user into a Dynamic List. Utilizing the Image object the images are all the same size in the list. However, depending if the original image portrait or landscape the aspect ratio is distorted.
? is there a way keep the aspect ratio similar to the auto, cover, contain of a background image?
? or, is there a way to dynamically assign a background image for example to a Block object in Dynamic list?
You can define the logic to load the necessary images into dynamic list.
Here is a good tutorial from Mark:
If you want to be able to change any image in the list, you can save the images to the database, then load it to the dynamic list. And when necessary, you can update the database entry and reload the list.
in the video the images have different sizes depending of the underlying file. By setting the image size to 100% width and 150 px height all the images in my list are the same size, however they are squashed or stretched.
@Marina.Rudenko : Thanks for this hint. I would wish, this feature becomes part of the image component configuration, because this is used very often.
One more question: The actual standard name of this property is “object-fit” (see e.g., object-fit - CSS | MDN). Using this identifier works similar well as when using your camelCase notation. Are you translating any standard css property to camelCase?