# Compress an Embedded PNG

**URL:** <https://forum.kirupa.com/t/compress-an-embedded-png/319564>\
**Category:** flash\
**Created:** [February 24, 2011, 6:18pm UTC](https://forum.kirupa.com/t/compress-an-embedded-png/319564 "2011-02-24T18:18:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![likwid](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@likwid](https://forum.kirupa.com/u/likwid)\
**Post date:** [February 24, 2011, 6:18pm UTC](https://forum.kirupa.com/t/compress-an-embedded-png/319564/1 "2011-02-24T18:18:13Z")

</div>

I’m using this code to embed an image into my flash file:  
[Embed(source=“images/grass01.png”)]

As you all know, if you embed an image, it comes in without any compression at all.

Is there any way to compress this image without having to do it manually? (I have hundreds of images that will be embedded).

I came across this link [http://help.adobe.com/en\_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60546-7ffb.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f90](http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60546-7ffb.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f90)  
but I assume this is a flex only thing, as I get an error if I try putting the compression variable in my embed tag.
