---
title: Introduction to image variants
---

> **Documentation indexes**
> The indexes below list current page URLs with titles and descriptions. Links on this page point to the Markdown versions of the linked pages.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

This module covers [image variants](https://docs.kentico.com/documentation/developers-and-admins/development/content-types.md#configure-image-variants) from the first definition to the editor's choice in a widget. You plan a small set of variants for your whole project, render them in views and Page Builder components, and give editors a drop-down for picking the variant of each image.

With a well-planned set, high-density phones get sharp images, slow connections get lighter pages, and crops keep the subject in the frame.

### Prerequisites

This module's hands-on materials require the following:

- Familiarity with [C#](https://learn.microsoft.com/en-us/dotnet/csharp/), [.NET Core](https://learn.microsoft.com/en-us/dotnet/), [Dependency injection](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection), and the [MVC pattern](https://learn.microsoft.com/en-us/aspnet/core/mvc/overview).
- Familiarity with [content item assets](https://docs.kentico.com/documentation/business-users/content-hub/content-item-assets.md), the [content retriever API](https://docs.kentico.com/documentation/developers-and-admins/api/content-item-api/content-retriever-api.md) and [tag helpers in Xperience](https://docs.kentico.com/documentation/developers-and-admins/development/reference-tag-helpers.md).
- Basic experience with [Page Builder widgets](https://docs.kentico.com/documentation/developers-and-admins/development/builders/page-builder/widgets-for-page-builder.md).
- A running instance of Xperience by Kentico, preferably [31.7.2](https://docs.kentico.com/changelog.md) or higher.

  > **Note:** Some features covered in the training guides may not work in older versions.

> **Info:** **Code samples**
>
> You can find a project with completed, working versions of code samples from this module and others in the [finished branch](https://github.com/Kentico/xperience-by-kentico-training-guides/tree/finished) of the _Training guides_ repository.
>
> The [main branch](https://github.com/Kentico/xperience-by-kentico-training-guides) of the repository provides a starting point to code along with the guides.
>
> The code samples in this module are compatible with [.NET 8](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8/overview) and later. They use [`C#12` features and syntax](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12), but they do not depend on any features introduced in later C# versions.
>
> They come from a project that uses [implicit using directives](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview#implicit-using-directives). You may need to add additional `using` directives to your code if your project does not use this feature.
