Managing images in Flex block
In Flex block, you can add images, place them in an arbitrary place in the block and one above the other, align them on different sides of the block (behind the left and top edges, etc.), change the size and visible part of the image (position it), etc. This gives freedom in editing and allows you to realize many creative ideas.
Content:
- Adding and editing an image
- Batch image editing
- Scale to fill mode (change image aspect ratio)
- Scale to fit mode (preserve image aspect ratio)
Adding and editing an image
- After adding the “Image” element, hover over it and click on the “gear.” In the new window, click on Upload to add a file from your computer or on the Gallery button to search or generate other images:

- In a new window, you can select one of the already added images, find the desired image in the Free photos tab, or generate your own image using AI Visual:

- Hold down the ALT key and click on the image to see the distance to the edge of the block in pixels:

- To move the image around the block space, hold it with the left mouse button and drag it in the required direction. As soon as the image approaches the center of the block in length or width, you will see the corresponding red linesю. They will come in handy if you need to place the image exactly in the center of the block (vertically and/or horizontally):

- By clicking on the icon in the form of three dots, you will see a list of available actions with the image:

Batch image editing
- You can select several images with the mouse and move them as one element:

- To check the distance in pixels from one image to another, select one of them and hover over the other.

- The image can also be placed relative to each other along the top edge:

... along the bottom edge:

And also align the centers of the two images with each other:

Scale to fill mode (change image aspect ratio)
By default, images are added to the Flex block with the fill mode (Scale to fill). When an image is scaled to fill, it means that the entire container is filled with the image, even if it requires cropping or stretching the image. The image's aspect ratio might not match the aspect ratio of the container, which can lead to parts of the image being cropped out or the image being stretched to fit the container entirely.
- You can edit the image size by stretching or shrinking it in different directions:

- It is also possible to adjust the positioning of the image, that is, which part of it will be visible and which part will be cropped. To do this, click on the Position button:

…and select the part of the image that should be displayed:

- Click the left mouse button outside the photo to apply the changes.
- In scale to fill mode, you also have the option to zoom in and out to select the desired area to be displayed.
ㅤㅤㅤ1) To do this, click on the aforementioned Position button or double-click on the image.
ㅤㅤㅤ2) Then set the required image scale:

...and click outside of it to apply the changes.
ㅤㅤㅤ3) If necessary, you can select which image's area to display:

Scale to fit mode (preserve image aspect ratio)
When an image is scaled to fit, it means that the entire image is resized proportionally to fit within a specific container while maintaining its aspect ratio. This ensures that no part of the image is cropped or cut off, but it might result in empty spaces (margins) within the container if the container's aspect ratio differs from that of the image. This approach is used to keep the entirety of the image visible.
- To enable this mode, click on the gear icon:

- Activate the Scale to fit switch:

This option allows you to resize an image while maintaining its aspect ratio:

Feel free to contact us anytime via chat or email (support@weblium.com). We will be glad to help!
Updated on: 01/31/2024
Thank you!
