![]() You can control the background color of the padding to match the layout. You can choose which area to crop by controlling the focus point. If only one of the height(h) or width(w) is specified, then ImageKit.io adjusts the other dimension accordingly to preserve the aspect ratio, and no cropping occurs.īut when you specify both height(h) and width(w) dimension and want to preserve the aspect ratio - you have the following three options: 0.1 means 10% of the original width, 0.4 means 40% of the original width, and so on. You can either specify an absolute value as we did above, i.e., 400px, or use a float number to specific in percentage, e.g., 0.5 means 50% original width. To resize image to 400 width and 200 height, we can use tr=w-400,h-200 400x200 image To get a 200px wide image, we will add a tr query parameter with value w-200 as shown below: 200px wide image Let's assume we have an original image which is 1280x853px. Resize image - Basic height & width manipulation Here is a quick video demonstration of dynamic image resizing before we dive into more details.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |