# Memory issues with hosted images

**URL:** <https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 5, 2023, 6:05pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797 "2023-12-05T18:05:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Dixon](https://avatars.discourse-cdn.com/v4/letter/t/e56c9b/32.png) [@Tyler\_Dixon](https://forum.inductiveautomation.com/u/Tyler_Dixon)\
**Post date:** [December 5, 2023, 6:05pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/1 "2023-12-05T18:05:22Z")

</div>

I have the same issue, which I suspect is from several SVG graphic in my Image Management folder at a size of 56MB. I have them linked to a container through the CSS under backgroundImage url("/system/images/path/to/image.svg"), then set backgroundSize to "cover" so that it fills the entire container. Why would this hog up short term memory of 2GB? What is short term memory with respects to Ignition, the Gateway and the Perspective WebUI?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 5, 2023, 11:38pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/2 "2023-12-05T23:38:09Z")

</div>

> [@Tyler\_Dixon](#):
>
> several SVG graphic in my Image Management folder at a size of 56MB

This size seems phenomenally high? What do you have in these SVGs?  
If you have raster images within them, they should be removed.

---

<div class="post-metadata">

**Author:** ![Tyler\_Dixon](https://avatars.discourse-cdn.com/v4/letter/t/e56c9b/32.png) [@Tyler\_Dixon](https://forum.inductiveautomation.com/u/Tyler_Dixon)\
**Post date:** [December 6, 2023, 3:42pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/3 "2023-12-06T15:42:04Z")

</div>

I am using Microsoft Visio to overlay some jpg/png onto another jpg/png to update a wide view of one of our facilities. I then save/change file type to SVG of the entire view. This generates near 56MB.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 6, 2023, 3:46pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/4 "2023-12-06T15:46:16Z")

</div>

> [@Tyler\_Dixon](#):
>
> overlay some jpg/png

That makes a bitmap inside your SVG. That makes the file size and memory blow up. Don't use jpegs (or any other pixel-based image format) at all.

---

<div class="post-metadata">

**Author:** ![Tyler\_Dixon](https://avatars.discourse-cdn.com/v4/letter/t/e56c9b/32.png) [@Tyler\_Dixon](https://forum.inductiveautomation.com/u/Tyler_Dixon)\
**Post date:** [December 6, 2023, 3:52pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/5 "2023-12-06T15:52:18Z")

</div>

Xmas list item, get an arial drone to snap a picture of what I need, save this as an SVG. I have been good this year, but not to the extent of getting someone to fly a drone yet. Any suggestions as to what would be my options to overlay snip-its from images of buildings that were built later to the over all view, to then save as SVG at a smaller file size?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 6, 2023, 4:26pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/6 "2023-12-06T16:26:51Z")

</div>

> [@Tyler\_Dixon](#):
>
> snap a picture of what I need, save this as an SVG

And how do you expect to save a photograph as a non-pixel-based image format inside an SVG?

You need a **pure vector** graphic, not any kind of photo or photo format.

You should ask your mechanical/civil engineering group to export your facility plan view drawing as an SVG and prune that down.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 6, 2023, 4:27pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/7 "2023-12-06T16:27:51Z")

</div>

> [@Tyler\_Dixon](#):
>
> snip-its from images

Don't. Draw vectors instead of embedding photos.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 6, 2023, 4:39pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/8 "2023-12-06T16:39:15Z")

</div>

> [@Tyler\_Dixon](#):
>
> save as SVG at a smaller file size?

To expand on this a little bit: SVG isn't a compression format. It's a fundamentally different model of how an image works - there's raster formats like BMP, PNG, JPEG - or there's vector formats like SVG. The whole thing with SVG is that it's literally an XML file containing a bunch of line/circle/shape/point definitions in a coordinate space. It _also_ contains the ability to "embed" raster images - but then you're getting none of the benefits of SVGs (arbitrary scaling to other resolutions) _and_ none of the benefits of your chosen raster format's compression (because SVG is plain text, so your data will always be written out in some chunky text format like b64 anyways).

If you have raster images you want to use as backgrounds for views, just save those raster images in some format that's good for compression like JPEG (if you can accept minor loss in quality, which is usually acceptable for photos). Filesizes should be drastically smaller and therefore less of a hit on the IDB. If it's still not enough, stand up a true file server like nginx or Traefik or something else on the same host as the gateway and use that to serve up your static images - it'll avoid the load on the gateway and probably be faster, to boot.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 6, 2023, 6:39pm UTC](https://forum.inductiveautomation.com/t/memory-issues-with-hosted-images/82797/9 "2023-12-06T18:39:01Z")

</div>

If you get a nice Xmas bonus, get Faro Technologies in to scan your building (roof), they export as SVG

> **[Release Notes for FARO Zone 3D](https://knowledge.faro.com/Software/FARO_Zone/FARO_Zone/Release_Notes_for_FARO_Zone_3D)**
>
> This article lists the Release Notes for each version of FARO Zone 3D Software to date. The current version release notes are displayed at the top of the article. Previous revisions are contained in …

Can't afford the drone or scanner? Just google it; [https://mapsvg.com/docs/basics/download-svg-with-google-map](https://mapsvg.com/docs/basics/download-svg-with-google-map)
