# Changing the size of pictures

**URL:** <https://forums.ankiweb.net/t/changing-the-size-of-pictures/31062>\
**Category:** Help\
**Created:** [June 9, 2023, 6:35pm UTC](https://forums.ankiweb.net/t/changing-the-size-of-pictures/31062 "2023-06-09T18:35:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![electricanki](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@electricanki](https://forums.ankiweb.net/u/electricanki)\
**Post date:** [June 9, 2023, 6:35pm UTC](https://forums.ankiweb.net/t/changing-the-size-of-pictures/31062/1 "2023-06-09T18:35:14Z")

</div>

I’ve tried changing the width and height of pictures in my deck to standardise them. Every time I do this the pictures get pushed to the left.

Please help.

---

<div class="post-metadata">

**Author:** ![electricanki](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@electricanki](https://forums.ankiweb.net/u/electricanki)\
**Post date:** [June 10, 2023, 1:27pm UTC](https://forums.ankiweb.net/t/changing-the-size-of-pictures/31062/2 "2023-06-10T13:27:40Z")

</div>

I’ve found one solution is to use the code below in the styling.

img {  
width: auto;  
height: auto;  
max-width: 400px;  
max-height: 400px;  
}

However, this wasn’t a solution for individual pictures. Sometimes cards will have more than one image and they need to be sized differently. When I add size to an image it moves to the left of the screen.

\<  
div style=‘font-family: Song; font-size: 20px; color: grey; width: 100px;’\>{{W picture}}/div\>

To fix this I used the “center” tag.

\<  
center\>

{{W picture}}/div\>/center\>

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 12, 2023, 6:26am UTC](https://forums.ankiweb.net/t/changing-the-size-of-pictures/31062/3 "2023-06-12T06:26:08Z")

</div>

For future reference, you can put text between backticks to get it to display correctly, eg

```auto
`<foo>`

```

will give you `<foo>`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [July 12, 2023, 6:27am UTC](https://forums.ankiweb.net/t/changing-the-size-of-pictures/31062/4 "2023-07-12T06:27:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
