# How can I insert an image file into a Scribble document?

**URL:** <https://racket.discourse.group/t/how-can-i-insert-an-image-file-into-a-scribble-document/2779>\
**Category:** Questions & Answers\
**Tags:** scribble\
**Created:** [March 11, 2024, 2:53pm UTC](https://racket.discourse.group/t/how-can-i-insert-an-image-file-into-a-scribble-document/2779 "2024-03-11T14:53:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [March 11, 2024, 2:53pm UTC](https://racket.discourse.group/t/how-can-i-insert-an-image-file-into-a-scribble-document/2779/1 "2024-03-11T14:53:50Z")

</div>

Someone recently asked

> how can I insert a png image file into a Scribble document?

The scribble manual gives a nice example of using a pict you create yourself:

```scheme
@; ----------------------------------------
@section[#:tag "pictures"]{Pictures}

Any value that is convertable to an image can be used directly within
a Scribble document. Functions from the @racketmodname[pict]
and @racketmodname[2htdp/image #:indirect] libraries, for example, generate
images. For example,

@sample|{
  @(require pict)

  This cookie has lost its chocolate chips: 
  @(colorize (filled-ellipse 40 40) "beige").
}|

renders as

 @result{
   This cookie has lost its chocolate chips:
   @(colorize (filled-ellipse 40 40) "beige").
 }

```

from [https://docs.racket-lang.org/scribble/getting-started.html#(part.\_pictures)](https://docs.racket-lang.org/scribble/getting-started.html#%28part._pictures%29)

It turns out, adding a `.png` is just as easy

```scheme
@centerline{@image[#:scale 0.7 "example.png"]}

```

in [https://github.com/racket/drracket/blob/master/drracket/scribblings/drracket/interface-essentials.scrbl](https://github.com/racket/drracket/blob/master/drracket/scribblings/drracket/interface-essentials.scrbl)

adds the image of DrRacket to the interface essentials page in the DrRacket Guide:

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/7/79e381e0a3089d59cdb609956d13bc1657f02a6a.jpeg)

[https://docs.racket-lang.org/drracket/interface-essentials.html](https://docs.racket-lang.org/drracket/interface-essentials.html)

A simple example

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/2/2e84730b0ef4ee33e2868144c57249297c46d7de.jpeg)

```scheme
#lang scribble/base
 
@title{On the Cookie-Eating Habits of Mice}
 
If you give a mouse a cookie, he's going to ask for a
glass of milk.
@image[#:scale 0.7 "mouse-2.png"]

```
