惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LangChain Blog
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
NISL@THU
NISL@THU
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cisco Talos Blog
Cisco Talos Blog
A
Arctic Wolf
T
Troy Hunt's Blog
U
Unit 42
Forbes - Security
Forbes - Security
J
Java Code Geeks
P
Privacy International News Feed
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
H
Heimdal Security Blog
量子位
Martin Fowler
Martin Fowler
G
Google Developers Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
罗磊的独立博客
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
D
DataBreaches.Net
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
S
Secure Thoughts
Apple Machine Learning Research
Apple Machine Learning Research

ImageKit.io Blog

Next.js Image Optimization with ImageKit Use Video as a Background in Your Next.js Project How to Fix Autoplay Video in Next.js How Durian Scaled a Visual-First Retail Experience to 350K Monthly Visitors Online How Matsmart accelerated image delivery across countries with ImageKit AI in Digital Asset Management: From Smart Workflows to Agentic Automation How Joseph Joseph unified and secured global video delivery with ImageKit How Modall powers fast, effortless media delivery across 40+ projects with ImageKit Digital Asset Management (DAM) Trends: 2026 Report How to add a poster image to Video.js player (and automate it) HLS streaming with Video.js + React Building the future of storytelling with fast, AI-powered video delivery How PushOwl delivers 100M+ image-rich notifications seamlessly with ImageKit How Homify delivers millions of interior design images seamlessly with ImageKit Better event discovery with lightning‑fast videos & images Adding video player in React Native Video player in Angular applications Crop and resize videos in React Next.js image and video upload React image and video upload React video optimization How we quadrupled our traffic to 625K monthly page views How Apollo 24|7 boosted performance & reduced costs with ImageKit Simplify your media workflows with ImageKit DAM integrations Extending Lighthouse for custom image and video optimization analysis Brand Asset Management: What is it? How does it work? WordPress Digital Asset Management Guide - Manage your WP media assets better Why Shopify retailers need a digital asset management solution DAM vs. SharePoint: Which is best for you? AI-powered Metadata and Tagging in Digital Asset Management How Hopscotch built India's largest online Kids' fashion brand with ImageKit Dropbox Vs. DAM: Which Is The Right Tool For Digital Asset Management Digital Asset Management for Photographers: A Complete Guide Why digital asset management for agencies is essential Helping both Top and Bottom Line: SaffronStays rapid, profitable growth with ImageKit How KreditBee simplified media experiences with ImageKit Google Drive alternatives for businesses (with fast-growing teams) Node.js image upload ImageKit: The Secret Ingredient in Swiggy’s Expansion Journey Streamlining the Design Approval Process: A Comprehensive Guide AV1 Codec - Complete guide for video application devs PHP image and video upload Angular image & video upload AV1 vs VP9: Which codec should you choose? Adding video player in Next.js React Video Player VP8 vs VP9 - In the context of online video delivery Exploring WebM vs MP4 7 Free Digital Asset Management Software that are not Open-Source Comparing 9 Top Digital Asset Management Tools in the Market What are Brand Standards and Why do they Matter? Boost Sales and Brand Appeal: Essential Tips for eCommerce Image Management Brand Recall: The Strategy to Create Unforgettable Brands How to upload files in HTML? Branding for Small Businesses (2025 Edition) Everything you need to know about VP9 codec Recent updates from ImageKit and what's next Best Ways to Write RFP For Digital Asset Management (+ with free RFP template) What is Brand Dilution? How to Avoid It? Explained with [Examples] The Importance of Brand Identity: Leveraging Digital Asset Management for Impact From Launch to Scale: How to Launch a Brand Campaign Digital Asset Management Requirements - What do You Need to Evaluate and How? Marketing Collateral Management: A Quick End-to-End Guide Video Content Management System: What Is It And How To Choose One? Dropbox vs. Google Drive vs. Onedrive: The Best Cloud Storage Solution How to Build Brand Trust: Get Started In 2025 Google Drive vs. Box: A Detailed Comparison How Digital Asset Management Solutions Help Protect Brand Equity A DAM Solution Can Safeguard Your Digital Intellectual Property - Here’s How WebP Vs. PNG: Which Image Format Should You Use and Why? How to Resize Images in Bootstrap Easily Progressive jpegs (PJPEG): the key to loading images faster on your website Dropbox vs. Google Drive: The Best Cloud Storage For Digital Assets Dropbox Pros & Cons In 2024: An In-Depth Analysis and Why A DAM Solution Stands Out Google Drive Vs OneDrive: The Better Storage Option For Digital Assets Manage your video assets better with video metadata Understanding DAM's Role in Strengthening Brand Identity Digital asset management strategy: What to know before creating one The Ultimate Guide To Marketing Agency Onboarding 6 Solutions To Simplify Large File Sharing Over The Web A Step-by-Step Breakdown of a Video Production Workflow 13 Digital Asset Management Use Cases You Should Know How to Conduct a Brand Audit and Manage Your Brand Assets Costly Consequences of Inconsistent Branding And How DAM Can Help Dynamic Asset Transformation: What It Is, Why You Need It, and How ImageKit Can Help Everything You Need to Know About HTML Video Autoplay How To Select Your DAM Vendor: A Complete Guide How to Boost User Experience with Smart Digital Asset Management React Image Optimization: A Guide for Web Developers Why Should DAM Be A Part Of Your MarTech Stack? Unleashing the Power of Content Repurposing with ImageKit MKV vs MP4: Which Video File Format Is Better for Your Needs? Digital Asset Management For Ecommerce: A Complete Guide How an Image Tagging Software can Transform Your Image Search How to Manage Your Content Lifecycle Effectively M4V vs MP4: Which Video Format Should You Use and Why? Why Every Business Needs An Image Management System All The Questions To Ask During A Dam Demo Which is the Best Image Format for Your Website? Uploading Multiple Files Using JavaScript: A Comprehensive Guide
How Smart Crop and Object-Aware Crop Can Help Deliver Perfect Responsive Images
Rahul Nanwani · 2018-12-27 · via ImageKit.io Blog

Images are a critical part of all websites and apps. Whether it be an e-commerce store, a travel website, or a content website, a typical website would have hundreds of thousands of images. The number can be significantly higher if you have user-generated content on the website.

With such a large number of images on a website, for a perfect responsive image experience on each user’s device, the images should also change according to the device that is requesting them. Which means that instead of resizing the image using CSS, the image that loads on a mobile device should actually be smaller in dimensions than the one that loads on a desktop device.

Why does regular cropping fail?

In such a scenario, where a variety of images have to be resized for different devices and different placeholders, cropping in an image is inevitable.

The default cropping strategy adopted for images is centre cropping - preserve the centre of the image and crop out from the edges. While this strategy works fine for a lot of cases, it can fail when the subject is not at the centre of the image.

Here are some examples of poor thumbnails as a result of centre cropping -

Original Images (scaled down)Image thumbnails 150×200

You may get away with such thumbnails on your website, not all of your users may care about it. But if you are one of those companies which want to deliver a perfect experience to their users, even if it's a thumbnail of a product, you would not want such improperly cropped thumbnails to be displayed for your users.

What’s the solution then? How do we ensure that we are cropping the images correctly while creating thumbnails?

Enter ImageKit’s Smart Crop and Object-Aware Crop

Smart Crop is a content-aware cropping method available to all ImageKit users that analyses the image content, and tries to ensure that the most important part of the image is always at the centre of the final thumbnail.

Let’s see how it works for the images where the centre crop failed.

Original Images (scaled down)Centre-cropped image thumbnails 150×200Smart-cropped image thumbnails 150×200

In each case, the smart crop was able to get the most important part of the image in the centre.

Now, if your image contains multiple objects and you need to crop out a single one, object-aware cropping is the solution. With over 80 different objects to choose from—including animals, food and drink, everyday utilities, and more—object-aware cropping automatically isolates and crops the desired object from your images.

How to enable smart crop and object-aware crop in the image URL?

Well, it’s really quite simple. Along with the height and width, you need to specify the focus mode for cropping and set it to auto. This is done using the fo-auto parameter in the transformation string in the URL.

For example,

https://ik.imagekit.io/demo/img/tr:w-150,h-200,fo-auto/test_image.jpg

You can read more about this focus parameter in ImageKit here.

For object-aware cropping use the parameter fo-<object name>. That means if you want to crop out a chair use fo-chair; couch with fo-couch.

  • https://ik.imagekit.io/ikmedia/Graphics/Furniture.jpg?tr=fo-couchcrops out the couch.
  • https://ik.imagekit.io/ikmedia/Graphics/Furniture.jpg?tr=fo-chair crops out the chair.

Practical applications of smart crop and object-aware crop

Now that we have seen how ImageKit works, let’s take a look at how you can use it on your website.

1. For e-commerce websites
Creating perfect product thumbnails

A product needs to be displayed on multiple pages on your website or app - the listing page, the product detail page, as a small thumbnail in an image carousel, etc. With smart crop, you can ensure that each product thumbnail is perfect and showcases your product the way it should be shown.

How can smart crop can help your e-commerce store?

We are using scaled-down versions of images here for display, but it does give an idea about the power of smart crop.

Original Image
Without Smart Crop
Mobile Thumbnail
200px x 200px
Desktop Listing Page
350px x 300px
Desktop Product Carousel
400px x 600px (scaled to 60%)
With Smart Crop
Mobile Thumbnail
200px x 200px
Desktop Listing Page
350px x 300px
Desktop Product Carousel
400px x 600px (scaled to 60%)

Now what if you want a product carrousel where in addition to the original image, you require close-ups of each object you desire to sell. Object-aware cropping automates this for you and you don’t need to manually crop out each object.

Original Image
With Object-Aware Crop
CouchChair

2. Travel & content websites and user-generated images
Get the most important region in your thumbnails

ImageKit’s smart crop can automatically determine the most important part in an image, whether it’s a monument or a landscape or a car, and preserve it in the final thumbnail.

Few examples of smart crop in action for different kinds of images:

Original Image
Without Smart Crop
Mobile Thumbnail
200px x 200px
Desktop Cover Image
800px x 300px (scaled to 60%)
With Smart Crop
Mobile Thumbnail
200px x 200px
Desktop Cover Image
800px x 300px (scaled to 60%)

E-commerce & content websites often have the need to remove an image's background to create different versions of them. You can now use ImageKit's Background Removal Extension to remove the background of images in the media library with ease.

Face thumbnails with smart crop

Till now, we have seen how smart crop works great for bringing the subject to the centre of the image. But there's more to it than that.

The smart crop has another face-cropping mode that finds the face in an image and extracts it to create a thumbnail. This would help in cases where you need to create profile pictures from a user’s photo.

Few examples of the face-cropping mode in action:

Original ImageRegular Smart Cropped ImageFace-cropped Image

How to get the face cropping mode for your images?

Again, like every other transformation in ImageKit, this one is really just as simple.

You need to set the value of the focus parameter to face in your image URL. This is done using the fo-face parameter in the transformation string in the URL.

For example:

https://ik.imagekit.io/demo/img/tr:w-200,h-200,fo-face/test_image.jpg

Putting it all together with other transforms

Apart from the examples demonstrated above, you can combine smart cropping and object-aware cropping with other transforms in ImageKit to create really cool user interfaces.

Let’s say, just like Facebook, you want to create a user’s profile page with a user profile picture and a cover photo. Let’s take the following images as an example.

With the smart crop set to face-crop mode and the radius transformation, we can get a rounded profile picture of the user.

We can then use the regular smart crop and blur transformation to resize the cover photo as per the required size for desktop and mobile devices.

Combining these two pictures using HTML and CSS (or in an app), this is how the end result can look like on different devices:

Your object-aware cropped images can be appropriately padded to fit distribution site requirements, and you can easily add overlays to display prices.

Object-aware cropping with Padding
Object-aware cropping with Padding
https://ik.imagekit.io/ikmedia/Graphics/Furniture.jpg?tr=fo-couch:w-500,h-500,cm-pad_resize,bg-FFFFFF:l-image,i-ik_canvas,bg-00000080,lfo-bottom,w-bw,h-70,l-end:l-text,i-Yellow 3-seater Couch,tg-b,fs-28,lx-10,ly-N38,co-FFFFFF,l-end:l-text,i-At just Rs. 20%2C000,fs-16,co-FFFFFF,lx-10,ly-N10,l-end

Conclusion

Using smart crop and object-aware crop for your images requires a very small change in your image URLs but it can help you inch closer to a perfect image experience across devices. Just add fo-auto for general smart crop and fo-face for the face-crop mode of smart crop. It is especially useful if you get a lot of user-generated content or the main subject in the photos is off-centre.

So, what are you waiting for? Try it for your images and start delivering a better experience to your users. Sign up for ImageKit for free!