# Image scale compression size

**URL:** <https://forum.litium.com/t/image-scale-compression-size/1330>\
**Category:** Questions\
**Tags:** litium-5\
**Created:** [February 12, 2020, 1:44pm UTC](https://forum.litium.com/t/image-scale-compression-size/1330 "2020-02-12T13:44:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter.andersson](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@Peter.andersson](https://forum.litium.com/u/Peter.andersson)\
**Post date:** [February 12, 2020, 1:44pm UTC](https://forum.litium.com/t/image-scale-compression-size/1330/1 "2020-02-12T13:44:40Z")

</div>

Hey,  
I’m having an issue with the rescaling functionality using GetUrlToImage(). For example I have an image that currently has the size 814x611px.  
When i’m getting the image by default `GetUrlToImage(new Size(-1, -1), new Size(-1, -1))` it returns an image as 814x611, and 124kb large.

I don’t need that large image, so if i want to get a slighty smaller image for example a width of 695px, i’d use the following code:  
`GetUrlToImage(Size.Empty, new Size(695, -1))` this code returns an image of 695x522px, but it’s **272 kb** large

So basically:  
814x611 = 124kb  
695x522 (resized) = 272kb

Do anyone have any ideas how to decrease the size of the resized file?

Litium version: _5_

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [February 14, 2020, 10:13am UTC](https://forum.litium.com/t/image-scale-compression-size/1330/2 "2020-02-14T10:13:34Z")

</div>

Seems like your original image is optimized in a professional image editor such as Photoshop or something else and when you resize with the system it gives you a heavier image then the original even though image is smaller.

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [February 14, 2020, 11:51am UTC](https://forum.litium.com/t/image-scale-compression-size/1330/3 "2020-02-14T11:51:57Z")

</div>

It’s possible to implement the `Litium.Studio.Plugins.ImageResizer.IImageResizer` with the custom logic for resize process.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [March 13, 2020, 12:07pm UTC](https://forum.litium.com/t/image-scale-compression-size/1330/4 "2020-03-13T12:07:00Z")

</div>

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