# Images

> Optimize your work with images in Lunacy


This section covers how to work with raster images.

Lunacy supports these image formats: `PNG`, `JPG`, `JPEG`, `WEBP`, `BMP`, `ICO`, `GIF`, `SVG`. The `TIFF` format is not supported.

## [Adding images to the canvas](#adding-images-to-the-canvas)

There are several ways to **add images to the canvas**:

- Using the **Image tool** to add images from your computer
- Importing images from Lunacy’s **Photos** library
- **Drag-and-dropping** images from the file explorer
- **Copying images** from your desktop or browser and paste it onto the canvas
- **Importing images** from your web browser via link

#### Using the Image tool

To add images via the **Image tool**:

1. Press `M` or select the **Image tool** on the toolbar.
2. In the **Open** dialog box, choose one or multiple image files.
3. Click on the canvas to place the image to add the image in its original size or click and drag to adjust the image size before placing it on the canvas.

<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/tools_image_tool_add.png" height="auto"><source src="/public/tools_image_tool_add.mp4" type="video/mp4"></video>

#### The drag-and-drop method

You can always simply **drag and drop images** from your files into Lunacy.

<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/images_drag_and_drop.png" height="auto"><source src="/public/images_drag_and_drop.mp4" type="video/mp4"></video>

Alternatively, you can right-click on an image in your file explorer or browser and select **Copy image**, then simply paste it onto the canvas.

#### The Photos library

To use **images from the Lunacy Photos library**:

1. Open the **Photos** tab in the left panel.
2. Choose an image, then **drag and drop** it onto the canvas.

<video autoplay="" muted="" loop="" playsinline="" width="100%" poster="/public/images_photo_library.png" height="auto"><source src="/public/images_photo_library.mp4" type="video/mp4"></video>

<div class="callout callout--info">
    <p><strong>Tip:</strong> Use low-res photos, PNG icons, and illustrations for free as long as you include a link to <a href="www.icons8.com" target="_blank">icons8.com</a> in your final work.<br><br>To access <b>high-res photos and editable SVGs</b> without mandatory attribution use our graphics without mandatory attribution, consider our <a href="https://lunacy.docs.icons8.com/raw/subscriptions.md#graphics-subscriptions" target="_blank">graphics subscription</a>. By subscribing, you'll be supporting our artists and contributing to Lunacy's further development.</p>
</div>

#### Importing images from the browser

There are two ways to **import an image from your browser** via link:

- Right-click the image in your web browser and select **Copy image address** from the context menu. Switch to Lunacy, press `M` for the **Image tool**, then paste the image URL in the file name input field. Finally, click **Open**.

    OR

- Right-click the image in your web browser and select **Copy image address** from the context menu. Switch to Lunacy, right click over the canvas, and select **Paste here** from the context menu. Click **OK** in the Paste as image dialog box. If you click **Cancel**, Lunacy will paste the text of the image address.

<div class="callout callout--info">
    <p><strong>Note:</strong> This method works only when a web site provides direct links to images with an image extension at the end (<code>.jpg</code>, <code>.png</code>, etc.)</p>
</div>

### Adding image fills

You can also add images directly to your <a href="https://lunacy.docs.icons8.com/raw/layers.md" target="_blank">layers</a> (including <a href="https://lunacy.docs.icons8.com/raw/editing_shapes.md" target="_blank">shapes</a>, <a href="https://lunacy.docs.icons8.com/raw/layers.md#frames" target="_blank">frames</a>, and <a href="https://lunacy.docs.icons8.com/raw/text" target="_blank">text<.mda> layers). They will act as a layer background you can replace or modify anytime.

To **add an Image fill**:

1. Make sure your layer has a fill. If it doesn’t, click `+` next to the **Fill** section of the right panel with a layer selected.
2. Click on the color swatch in the **Fill** section to open up the color picker.
3. In the top bar of the color picker, click <embed type="image/svg+xml" alt="image_fill" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/UaEWmyqIP0iiZAIkJTe_pQ.svg" width="20" />.
4. Select an image from on your computer and click **Open**.

<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/styling_image_fill.png" height="auto"><source src="/public/styling_image_fill.mp4" type="video/mp4"></video>

Use the drop-down list below the **Choose image** button to select the fill method:

- **Fill**. Adjusts the image size to the layer’s width.
- **Fit**. Adjusts the image size to fit the layer’s height.
- **Stretch**. Stretches the image to fit the layer’s width and height.
- **Tile**. Duplicates the image in a tile pattern to fit the layer. The size of tiles is adjustable.

## Replacing images

There are two ways you can replace images. 

The first is to select an image and click the **Replace image** button in the **Image** section in the right panel. This only works for images [added directly to the canvas](#adding-images-to-the-canvas).

<embed type="image/svg+xml" alt="replace_image" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/--lPgBgoE0KJitXct9sAvw.svg" width="844" /> 

To **replace an image fill**, select the layer with the fill, click the swatch in the **Fill** section, then **Choose image**.

<div class="callout callout--info">
    <p><strong>Tip:</strong> You can also use these methods when you need to replace your current image with an image from the internet. Just paste the URL of the new image into the <b>File name</b> field of the <b>Open</b> dialog box and click <b>Open</b>.</p>
</div>

Another quick way to **replace an image or image fill** is by holding down `Ctrl` / `⌘` and drag-and-dropping an image from your desktop or the **Photos** library onto a layer, like in the demo below.

<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/styling_ctrl_image_replacement.png" height="auto"><source src="/public/styling_ctrl_image_replacement.mp4" type="video/mp4"></video>

Read the full list of Lunacy’s <a href="https://lunacy.docs.icons8.com/raw/tips.md" target="_blank">tips and tricks</a>.

## Editing images

### Cropping images

To **crop an image**:

1. Select the image.
2. Press `Enter` or click <embed type="image/svg+xml" alt="Vector" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/WyS0eXZYh0an2lsuK79VlQ.svg" width="20" /> on the context toolbar to enable **Edit mode**.
3. Crop the image, then press `Enter` again or click the Apply editing button in the right panel.

<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/images_crop.png" height="auto"><source src="/public/images_crop.mp4" type="video/mp4"></video>

### Image upscaler

Whenever you need to enhance the resolution and quality of an image, use the AI-powered <a href="https://icons8.com/upscaler" target="_blank">Icons8 Image Upscaler</a> built into Lunacy.

<embed type="image/svg+xml" alt="upscaler" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/9f14tl6R60ygAU8MH16xoA.svg" width="844" /> 

When you add an image to your document, the **Upscale image** prompt appears above it. Click it and wait a few seconds as the Upscaler enhances the image.

<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/images_crop.png" height="auto"><source src="/public/images_crop.mp4" type="video/mp4"></video>

<div class="callout callout--info">
    <p><strong>Note:</strong> The feature only is available to users with any paid subscription to Icons8 graphic assets.</p>
</div>

### Background remover

To **remove a background** from an image:

1. Select the image.
2. In the right panel, click **Remove background**.

<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/images_background_remover.png" height="auto"><source src="/public/images_background_remover.mp4" type="video/mp4"></video>


### Cutting out a part of an image

You can cut out part of an image so it becomes a new image layer that you can adjust as you like.

To **cut out a part of an image**:

1. Select the image.
2. Press `Enter` to enable **Edit mode**.
3. Choose one of the selection tools that show up below the image:
    - **Scissors**. With scissors, you can make a selection with any shape (rectangle, ellipse, triangle, etc.) by selecting the shape on the toolbar or pressing the corresponding shape shortcut.
    - **Freeform lasso**. With the freeform lasso, draw freehand selections on parts of the image, just like with the Pencil tool. To close the selection border, just release the mouse button.
    - **Polygon lasso**. Use the polygonal lasso to make selections using paths, similar to using the Pen tool. To disable snapping while drawing the selection, hold down `Ctrl` / `⌘`.
4. Once you have an area selected:
    - Press `Delete` to remove it completely.
    - Move the selection to where you want it to be. In this case, Lunacy creates a vector shape with an image fill that corresponds to your selection and automatically fills the emptied area with the color that’s prevalent along the selection border.

<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/images_cutout_tool.png" height="auto"><source src="/public/images_cutout_tool.mp4" type="video/mp4"></video>


### Image filters

Change the hue, saturation, contrast, and other properties of your images.

To do this:

1. Select one or several image layers.
2. Click `+` next to **Image filters** in the right panel.
3. Drag the sliders to adjust the image.


<embed type="image/svg+xml" alt="image_filters1" src="https://cdn-eu.icons8.com/docs/Dko8QE6mZ06fz2gAGGUBbA/g1bNFusqNUyU5XqLxLHBzA.svg" /> 



<!--


<video autoplay="" muted="" loop="" playsinline="" width="auto" poster="/public/images_adjustments.png" height="auto"><source src="/public/images_adjustments.mp4" type="video/mp4"></video>

-->

These adjustments are all reversible. You can discard all changes and restore the original image by clicking the Reset values (<embed type="image/svg+xml" alt="reset_overrides" src="https://cdn-eu.icons8.com/docs/M9n6bSgrBEaWHOHZwLkY3A/PmMyhR72A0GyShZvh91lgA.svg"  width="20" >) button next to the section header.

