---
title: Working with files
---

> 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).

> **Info:** This page is a part of a tutorial, which you should follow sequentially, from the beginning to the end. [Go to the first page: Getting started with Kentico](https://docs.kentico.com/k12sptutorial/getting-started-with-kentico.md).

## You will learn about:

> **Info:** **Important note**
>
> Dancing Goat is a specific sample website used for the purposes of the tutorial. Your company’s website will be different, and some functionalities may also be changed.

You already know how to work with the content of pages and how you can upload images. Let's take a closer look at what else can you do with images and other files you have created outside of Kentico.

Besides _images_, Kentico allows you to upload any kind of files, such as _videos_, Word or PDF _documents_, or zipped _packages_. Developers will likely limit the types of files you can upload to your website to the most common (images, documents, or videos). You can also preview some of the uploaded files, such as images, directly in the Kentico administration. Whether you can preview the file or not is determined by your web browser capabilities rather than Kentico.

### Files

There are a few ways you can add your files to Kentico. The two most common methods in Kentico are uploading files to _media libraries_ or adding them to pages as _attachments_.

### Media libraries

Files stored in the **Media libraries** application are called _media library files_. You can upload them to either an existing library or create a brand new library. Media libraries allow you to store your files in a hierarchy of folders and often represent the preferred way of storing files on your website.

This tutorial does not go into depth on media libraries as they are already well covered [in our documentation](https://docs.kentico.com/k12sp/managing-website-content/working-with-files/media-library-files.md), so feel free to learn more about them there.

### Page attachments

**Page attachments** are parts of your pages and you work with them in the **Pages** application. When you move a page that contains attachments, the attachments move as well. When you delete a page, you delete all of its attachments as well.

Kentico does not limit the number of attachments added to a single page. However, if you need to add larger files or upload many of them, we recommend using the **Media libraries** application instead. The number and size of attachments can influence the page's performance, causing slower loading times.

#### Uploading page attachments

You can upload page attachments in two ways – by using the **Content** tab, or the **Attachments** tab selectable in the _Properties_ drop-down menu next to it. Developers define which method you should use in which situations depending on your website's business requirements.

The _Attachments_ tab lists files attached to the page and allows you to _update_, _edit_ or _delete_ your existing attachments. Clicking the **New attachment** button opens a file uploader to add a new file. You can also upload images to the Attachment tab using some of the MVC widgets in the _page builder_.

The second method of adding files is to use the _uploader_ on the **Content** tab. It gives you the same options to manage the files as the _Attachments_ tab.

#### Working with attached images

When you upload an image that is supported by the browser (e.g., _png_ or _jpg_), you can hover the cursor over the file's name to _preview_ it in the administration interface. Clicking the **Edit** button opens a Kentico built-in **image editor**. You can use it to _crop_, _re-size_, and _rotate_ your images directly in Kentico. Though the image editor is a handy tool, we recommend that you edit your images before uploading them.

🎬 [Previewing and editing an attached image](https://docs.kentico.com/docsassets/k12sptutorial/working-with-files/Files_GIF.webm)

#### Working with attached files

If your attachment is of a different file-type than a supported image, clicking the **Edit** button opens the _metadata editor_. You can use it to change the name of the file or its description. Depending on your website's implementation, the _metadata_ can appear in the page's HTML markup to help with _image SEO_.

 **Task:**

You found a picture that would be a great fit for your _Coffee samples_ landing page. You decided to upload it to the _hero image_ widget. The image needs some editing, such as rotating, to display correctly in the _Hero image_ widget. And as you don't plan to use the previous _hero image_ in the future, remove it from the media library.

 **Need help?**

You can always get some help from our step-by-step guide:

1. Open your _Coffee samples_ page under the _Landing pages_ in the **Pages** application.
2. Navigate the cursor into your _hero image_ widget.
3. Upload your new hero image from your computer.
4. Click the **Save** button.
5. Open the **Media libraries** application and **Edit** () the _Graphics_ media library to review and edit your image.
6. Click the **Edit** () button next to your image to open the _image editor._ (If you are not sure which one it is, remember you can preview images by hovering your cursor over the image icon next to the image name.)
7. Open the _Rotation_ options in the image editor.
8. Select the _Rotate 90° left_ option
9. Click the **Save & Close** button.
10. Click the **Delete**() button to remove your old hero image.
11. Go back to the **Pages** application and navigate to the _Coffee samples_ page to see your changes.

Here’s some visual help:

🎬 [Files task](https://docs.kentico.com/docsassets/k12sptutorial/working-with-files/mvc_business_tutorial_adding_hero_image_to_coffee_samples_landing_page.webm)

**Previous page:** [Using the Kentico page builder](https://docs.kentico.com/k12sptutorial/mvc-business-tutorial/using-the-kentico-page-builder.md) — **Next page:** [Adding a new page](https://docs.kentico.com/k12sptutorial/mvc-business-tutorial/adding-a-new-page.md)

**Completed pages:** 4 of 6
