# Create Image Thumbnail

You can create square thumbnail images with the thumbnail option. Here is a 180px thumbnail image:

`https://demo.sirv.com/look.jpg?thumbnail=180`

Using an AI coding agent?

Install the [`sirv-dynamic-imaging`](https://www.skills.sh/sirv/image-optimization-skill/sirv-dynamic-imaging) skill, and your agent can build these image URLs for you. Ask in plain words, such as “Serve our product photos as 800px WebP.” [See all 8 skills](/help/rest-api/sirv-skills-for-ai-agents/)

![](https://demo.sirv.com/look.jpg?thumbnail=180)

## Longest/Shortest dimension

You can also scale images to fit a certain dimension, with the s option. The following will create an image up to 400px width or height (determined by the longer dimension):

`https://demo.sirv.com/look.jpg?s=240`

You make apply that size to the shortest dimension instead, by adding scale.option:

`https://demo.sirv.com/look.jpg?s=240&scale.option=fill`

These examples show how landscape and portrait images are resized, according to their shortest/longest dimension:

![Landscape image resized to 240px, shortest dimension](https://demo.sirv.com/look.jpg?s=240)

s=240

![Landscape image resized to 240px, longest dimension](https://demo.sirv.com/look.jpg?s=240&scale.option=fill)

s=240&scale.option=fill

![Portrait image resized to 240px, shortest dimension](https://demo.sirv.com/yshoes.jpg?s=240)

s=240

![Portrait image resized to 240px, longest dimension](https://demo.sirv.com/yshoes.jpg?s=240&scale.option=fill)

s=240&scale.option=fill

Use the shortest dimension for thumbnails that fill their box, and the longest dimension to show the whole image.
