Used in this video
TinyImage
タイニー
Export compressed JPG, PNG, SVG, WebP, AVIF, GIF and PDF files from Figma, reducing sizes by up to 95%.
Try TinyImageGet started today
Video Transcript
Today I'm going to be showing you how to compress your images to a certain file size target using the TinyImage Figma plugin.
The first thing we need to do, if you haven't already done so, is just go to the Figma Community and search for the word "TinyImage" and you'll see the result "TinyImage Compressor" pop up, then if you just click on the "Install" button on the right-hand side you'll be ready to go. Once we've done that we can jump back into our Figma file.
I've just got a handful of images in here that I'm going to show you what this looks like; if you just right-click anywhere, go down to "Plugins" and click on "TinyImage", that's just going to fire up the Figma plugin we just installed a minute ago. Okay, I'm not going to go through all the other features of this Figma plugin, I've got a few other video tutorials on our channel if you want to go through some other features. Today, we're just going to be focusing on file size targets. By default, the compression is based on percentages or a percentage based quality, but there's going to be times where you actually want to reach a certain file size target, a maximum file size for your image compressions. We can enable this feature by just clicking on the toggle called "Size target", so I've enabled that, and you can see here that it's changed the settings; instead of the quality based percentage slider, we now have an input field for a kilobyte value. You can toggle between these two, but for today we're going to be actually turning that on and seeing what that looks like.
The way it works is you essentially put in the file size target that you want the compression to reach, so if we just export these and get a bit of a baseline, I'm just going to actually turn that off for a second and I'm just going to export a few images and compress them to see what that file size looks like normally. We're going to compress these at 90% quality and see what that comes out as. The first one we've got us 700 kilobytes, 270 kilobtes, these will probably be similar; these are at 2x and this is at 1x. I'm just going to save those, and now we've got the baseline of our compression we might realize that we actually want these to be much lower or under a certain threshold that this quality isn't going to get us.
If we just re-run the Figma plugin, we can either do that from the sidebar over here or by right-clicking as we did before, and this time I'm going to change the quality slider back to the size targets, and I'm just going to compare what these image file image file sizes are now. For example we've got the cherry blossom, and cherry blossom at 2x; that's 277 kilobytes, 745 kilobytes, 693 kilobytes and 2 megabytes; what I might do is I'm actually going to set a global size target for all these, I'm going to make it 500 kilobytes. This is going to set the default maximum file size target to 500 kilobytes, but what I can also do is I might want one of these images to actually be smaller than that, so I can say for this cherry blossom regular version; it's currently at 277 kilobytes, but I actually want that to go down to 200 kilobytes. I'm going to override the default and make that one 200 kilobytes, and the rest I'm going to max out at 500 kilboytes, roughly.
Now that we've set our default file size at 500 kilobytes and we've overridden this one image at 200 kilobytes, we can now click the "Export" button once again, and this time it's going to compress the images not using the quality, now you can see they're trying to hit these file size targets. This one's 500 kilobytes, which is the maximum target, and then the next one's 200 kilobytes. You might have noticed in the label in brackets it did say that this method is actually a bit slower than the regular quality method, and the reason for that is it has to do multiple passes of the compression in order to get the file size down to the optimal size. You'll notice this more with larger images; 2x retina ones with large dimensions, and these are fairly large, so that's 1700 pixels by 1100 pixels, and the version at 1x should be a little bit faster, but it's going to it's going to do multiple passes to get the exact optimal compression level in order for you to reach the maximum quality, but also get just under the ideal target. You're really getting pretty much the exact maximum you can get without losing quality, but still getting as close as possible to that target.
We'll just wait for these two to finish up and then we can have a look what they look like once we actually export the zip file and have a look at that. Again, the 2x ones are taking a little bit longer just because they are a bit larger, but the 1x one should be much better, and bearing in mind these are also taking longer because we're setting a much lower threshold as well. These are originally three megabytes and we're getting them down to 493 kilobytes in this case. Just a little bit longer there; I've just saved that zip file, so I'm going to open that one up, and if we jump into the folder you can see here if we actually compare the two exports. This was our previous export that we did a minute ago; those are the bigger ones bigger file sizes, but in here you can see it's actually hit that threshold of exactly 500 kilobytes for these ones, bearing in mind this this file size is slightly different to the one we we put in there, but it's trying to get there as as close as possible. These kilobytes here is actually slightly different from the kilobytes that are in the Figma plugin; we've got 201 kilobytes, there's a 500 kilobytes, and then we've got the bottom random one as well which has come out at 489 kilobytes. That's what that looks like there, so I'm just going to close those ones off.
I just want to also note that the kilobyte compression only works for any image formats that are not PDFs; if you're trying to compress PDFs and wondering why you can't compress the PDFs to a kilobyte size, that's the reason. The kilobyte size is only for JPG, PNG, SVG, AVIF, WebP and that sort of thing; the PDFs unfortunately are only based on DPI, so if you do have a PDF export such as this one, you'll be able to choose between 72 DPI, 150 DPI and 300 DPI, and that will change the the quality as well, but you can use the size targets for any of the other file formats.
That's pretty much it. It's pretty simple, it's just a single toggle, the "Size Target" toggle, and again, you you might not need to use this all the time; this is really if you have a very specific use case where there's certain requirements for a project or file type that really do need to get under an exact kilobyte number, then you can use this feature, but otherwise feel free to continue using the quality slider, which is more just based on a quality ratio. You'll still get really good compression, you just won't get the exact numbers that you would with this brand new feature.
I hope that's helpful, I know a few of you have been requesting this feature for a little while, so thankfully it's shipped now and you can use it as of today. I hope that it helps with some of your projects and some of your exports that you've needed this feature for, and until next time, thank you as always for watching, and we'll be back soon with more Figma tutorials just like this one.
Adam Brock
Founder of Hypermatic
The secret weapons used
in high performing teams.
World-class teams of designers, developers and copywriters use our Figma plugins to 1,000x their daily workflows.
TinyImage
タイニー
Export compressed JPG, PNG, SVG, WebP, AVIF, GIF and PDF files from Figma, reducing sizes by up to 95%.
Try TinyImageGet started today
Pitchdeck
ピッチ
Magically turn your Figma designs into animated presentable slide decks, or export them to PowerPoint.
Try PitchdeckGet started today
Convertify
コンバート
Export Figma to Sketch, XD, After Effects or Import XD, Illustrator, Google Docs, PDF to Figma.
Try ConvertifyGet started today
Emailify
メール
Easily create and export responsive, production ready HTML emails (eDMs) from Figma.
Try EmailifyGet started today
CopyDoc
コピー
Everything you need to easily export, import, localize and update text in your Figma designs.
Try CopyDocGet started today
Bannerify
バナー
Animate and export production ready banners from Figma to HTML, GIFs and Videos, in seconds.
Try BannerifyGet started today
Crypto
ロック
Securely share your Figma designs and prototypes as password protected URLs or PDF files.
Try CryptoGet started today
Favvy
ファビー
Export production ready favicons (with code) for your website or PWA from Figma in seconds.
Try FavvyGet started today
Pixelay
ピクセル
Compare and visually QA your Figma designs against real website URLs using smart overlays.
Try PixelayGet started today
HyperCrop
クロッパー
Batch crop/resize multiple images into multiple sizes with presets, smart cropping and face detection.
Try HyperCropGet started today
Commentful
コメントフル
Supercharge your Figma comments and gather external feedback from stakeholders.
Try CommentfulGet started today
Weblify (Beta)
サイト
Inspect your Figma layers as clean HTML, Tailwind, React or Vue code in one click.
Try WeblifyGet started today