backup – Shrink down an image file which is made by with the Ubuntu’s “Disks” application

So I’ve made a backup image file from my Ubuntu system with the Disks application. My SSD storage is 180GB which is quite big due to the fact that my system is only 20% of it. So there are a numerous amount of empty space besides. I’ve found some solutions how to shrink down the .img file afterwards.

But what I’m looking for is a way or option to prepare/compress/create just the “active” part from the storage and leave the unused areas.

Therefore, to get an image like ~34GB instead of 180Gb (which is allocated the entire storage), according to the above instance.