---
title: 'Grav image manipulation'
url: 'http://tales.01space.net/docs/grav%20documentation/grav-image-manipulation'
markdown: 'http://tales.01space.net/docs/grav%20documentation/grav-image-manipulation.md'
date: '2026-11-20'
description: "Resize Images In Grav CMS, you can resize blog post images directly in Markdown, through Twig templates, or via plugins in Grav 2 / Admin2. 1. In Markdown (Per Image) Append media actions as query parameters to the image path inside your blog post's .md file: • Resize to fit within dimensions (pres…"
taxonomy:
  archives_month:
    - nov_2026
  archives_year:
    - '2026'
---

# Grav image manipulation

## Resize Images

In Grav CMS, you can resize blog post images directly in Markdown, through Twig templates, or via plugins in Grav 2 / Admin2.

### 1. In Markdown (Per Image)

Append media actions as query parameters to the image path inside your blog post's .md file:

• Resize to fit within dimensions (preserves aspect ratio):

```markdown
![Alt text](photo.jpg?resize=800,450)
• Resize and crop to exact dimensions (centered, no background padding):
![Alt text](photo.jpg?cropZoom=800,450)
• Force exact dimensions (may stretch/distort):
![Alt text](photo.jpg?forceResize=800,450)
```

### 2. In Twig Templates (For Blog Layouts / Featured Images)

In your blog item or post template, call media methods on page.media:

• Crop and resize a specific image:

```twig
 {{ page.media['photo.jpg'].cropZoom(800, 450).html('Alt text')|raw }} 
```

• Resize while keeping aspect ratio:

```twig

{{ page.media['photo.jpg'].resize(800, 450).html('Alt text')|raw }}

```

### 3. In Grav 2 / Admin2

• Visual cropping in Admin2: Install the Image Crop Plugin for Grav Admin2 to crop images directly from the Page Media panel or Media Manager and save a copy or replace the original.

• Shrink on upload: Plugins like Bildkompression compress/shrink images right after upload in Grav Admin 2.

For full parameter options and media filters, see the [Grav Media Documentation](https://www.google.com/url?sa=i&source=web&rct=j&url=CAESZwHEIkXXYVHRVqlR85oRbaMKiIA0BBx3x22lzCaefWAi-U0DkV_zqycRpE-I0hzUyJC8IaT6Dxs41ldRUip3F8PYXGRrHwQ454Zc1w2QJdbD2U--hi8dwAjrJL58CB69LZRgZRTZkBs&uoh=2&ved=2ahUKEwj4sKuK2ZWYAxXQAxAIHR78FRQQy_kOegoIAggACAAIHhAC&opi=89978449&cd=1&psig=AOvVaw3I-vdabWHj_MyX1juTY3Wg&ust=1795234843474000).

---

## Navigation

- Parent: [Grav documentation](http://tales.01space.net/docs/grav%20documentation.md)
- Next: [Child Theme with Sidebar Customization](http://tales.01space.net/docs/grav%20documentation/sidebar-customization.md)
