# ImageContainer image plotting problem

**URL:** <https://discourse.scverse.org/t/imagecontainer-image-plotting-problem/587>\
**Category:** squidpy\
**Created:** [June 30, 2022, 4:47pm UTC](https://discourse.scverse.org/t/imagecontainer-image-plotting-problem/587 "2022-06-30T16:47:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rinadango](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/rinadango/32/293_2.png) [@rinadango](https://discourse.scverse.org/u/rinadango)\
**Post date:** [June 30, 2022, 4:47pm UTC](https://discourse.scverse.org/t/imagecontainer-image-plotting-problem/587/1 "2022-06-30T16:47:27Z")

</div>

I have a problem importing an image into an Image Container and then plotting it using `sc.pl.spatial`.

What I did is:

`hi` is the the path to `.png` file, and `scale` is `0.048109304`, which is `tissue_hires_scalef`.

```auto
imag_hi = sq.im.ImageContainer(hi, scale = 0.048109304, layer = 'hires')

imag_hi.compute()

print(type(imag_hi["hires"].data))

img_array = imag_hi['hires'].data

data_r.uns[spatial_key][library_id]["images"] = {"hires": img_array}

sc.pl.spatial(data_r, color='leiden', scale_factor = 0.048109304)

```

**I get an error:** `TypeError: Invalid shape (1335, 2000, 1, 3) for image data`

Help would be appreciated. Thank you!!

---

<div class="post-metadata">

**Author:** ![giovp](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/giovp/32/153_2.png) [@giovp](https://discourse.scverse.org/u/giovp)\
**Post date:** [October 14, 2022, 9:53am UTC](https://discourse.scverse.org/t/imagecontainer-image-plotting-problem/587/2 "2022-10-14T09:53:11Z")

</div>

hi @rinadango I completely missed this sorry, is it still an issue?
