---
title: URLs of resized images in media libraries
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [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).

When you resize an image that you inserted into a media library using a web part, the editor, or a form control, the URL of the image changes in the following way:

| Resizing image to | Resizing is done by                       | The image URL                                                                                                         |
| ----------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Larger size       | Browser (css styles)                      | The file path<br>(e.g., /Kentico/CorpSite/media/MyPictureGallery/Panda.jpg)                                           |
| No change         | None                                      | The file path<br>(e.g., /Kentico/CorpSite/media/MyPictureGallery/Panda.jpg)                                           |
| Smaller size      | Internal resizing - a new file is created | Permanent URL\*<br>(e.g., /Kentico/getmedia/ed0be744-9e70-4056-8c7d-91fc5087813c/Panda.jpg.aspx?width=100\&height=66) |

\* Learn about [configuring general media library settings](https://docs.kentico.com/k12sp/configuring-kentico/configuring-the-environment-for-content-editors/configuring-media-libraries.md) to make the system use permanent URLs.

Every time you resize an image to a **smaller size**, the system makes a new copy of the image with smaller dimensions in the \_\__thumbnails_ folder, which is located in the original image's folder. The images are resized into smaller files to save bandwidth. You can override this behavior by setting the _getPermanent_ variable in the _btnImagePreview\_Click_ method within the _CMSModules\Content\Controls\Dialogs\Properties\HTMLMediaProperties.cs_ file to false.

![Resized image with permanent URL](https://docs.kentico.com/docsassets/k12sp/urls-of-resized-images-in-media-libraries/resized_image_permanent_url.png "Resized image with permanent URL")

> **Info:** The system also creates a new file every time you display this image as a thumbnail (e.g., in the **Tiles** or **Thumbnails** display tab of the Media library properties window).
>
> Resizing to a **larger size** is not done internally (the system does not create any files). Such a feature could be exploited to bring the server down, e.g., resizing an image to 1000000 height and 1000000 width could fully consume the server's resources.

> **Note:** **Note**: The automatic file resizing feature for smaller dimensions is not available when using a CDN to store and deliver media files (for example [Azure CDN](https://docs.kentico.com/k12sp/deploying-websites/running-kentico-on-microsoft-azure/configuring-azure-cdn.md) or [Amazon CloudFront CDN](https://docs.kentico.com/k12sp/custom-development/working-with-physical-files-using-the-api/configuring-file-system-providers/configuring-amazon-s3.md)). In this case, permanent URLs are not available and the files directly use the CDN's endpoint URL.
