> For the complete documentation index, see [llms.txt](https://docs.overleaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overleaf.com/writing-and-editing/inserting-images/changing-image-size-and-rotating-the-picture.md).

# Changing image size and rotating the picture

If we want to further specify how LaTeX should include our image in the document (length, height, etc), we can pass those settings in the following format:

```latex
\begin{document}

Overleaf is a great professional tool to edit online documents, 
share and backup your \LaTeX{} projects. Also offers a 
rather large help documentation.

\includegraphics[scale=1.5]{overleaf-logo}
```

<figure><img src="/files/hDNc19p9oVmq0hizzo48" alt="Example of changing image size"><figcaption></figcaption></figure>

The command `\includegraphics[scale=1.5]{overleaf-logo}` will include the image `overleaf-logo` in the document while the extra parameter `scale=1.5` will do exactly that, scale the image 1.5 times its real size.

You can also scale the image to a specific width and height.

```latex
\begin{document}

Overleaf is a great professional tool to edit online documents, 
share and backup your \LaTeX{} projects. Also offers a 
rather large help documentation.

\includegraphics[width=5cm, height=4cm]{overleaf-logo}
```

<figure><img src="/files/aG7rkDleMRzYUDMiYN1V" alt="Example of setting image height and width"><figcaption></figcaption></figure>

As you probably have guessed, the parameters inside the brackets `[width=5cm, height=4cm]` define the width and the height of the picture. You can use [different units](/writing-and-editing/inserting-images/advanced-latex-image-topics.md#commonly-used-latex-units-and-lengths) for these parameters. If only the *width* parameter is passed, the height will be scaled to keep the aspect ratio.

The length units can also be relative to some elements in the document. If you want, for instance, to make a picture the same width as the text:

```latex
\begin{document}

The universe is immense and it seems to be homogeneous, 
in a large scale, everywhere we look at.

\includegraphics[width=\textwidth]{universe}
```

![Example of image set to text width](/files/FE2c0pQ4ui9RjfjZGfwY)

Instead of `\textwidth` you can use any other default LaTeX length: `\columnsep`, `\linewidth`, `\textheight`, `\paperheight`, etc. See the [reference guide](/writing-and-editing/inserting-images/advanced-latex-image-topics.md#commonly-used-latex-units-and-lengths) for a further description of these units.

There is another common option when including a picture within your document, which is to rotate it. This can be easily accomplished in LaTeX:

```latex
\begin{document}

Overleaf is a great professional tool to edit online, 
share and backup your \LaTeX{} projects. Also offers a 
rather large base of help documentation.

\includegraphics[scale=1.2, angle=45]{overleaf-logo}
```

<figure><img src="/files/D75kcgTgVV0HsXHHsI0O" alt="Example of rotating an image"><figcaption></figcaption></figure>

The parameter `angle=45` rotates the picture 45 degrees counter-clockwise. To rotate the picture clockwise, use a negative number.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.overleaf.com/writing-and-editing/inserting-images/changing-image-size-and-rotating-the-picture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
