
What if you could offload image resizing, not to some foreign cloud, but to a microservice under your full control? And what if that tool was completely language and framework agnostic, meaning you could use it right away, no matter the stack? Meet imgproxy-a tool created exactly for these purposes. What if the image hosting problem (and perhaps you don’t even want to host anything, and just re-use images from a remote source) was the only problem you had to solve? Services like Cloudinary make on-the-fly transformations as accessible as possible, but every variant derived from the original image is considered a new image, thus depleting your quota. And with startups, requirements do change, and quite often. But this is another matter altogether: with every requirement change you have to waste time, storage, and processing power to handle all the transformations again and again. It’s one thing to write new code, letting tools like ImageMagick, well, do the magic. Now, you want your avatars to be more high-res! And you want to change the crop mode and dimensions.
Last but not least, how do I protect myself against image bombs (a sub-class of decompression bombs)?Ĭertinaly, there are a plethora of ready-made solutions available, and so, you decide to pick one.Įverything goes smoothly until, with a few thousand images on your hands, suddenly, your design requirements change. How do I plug everything into my existing app?. How do I handle image transformations? Where do I keep various versions of the same image?. Where do I keep my images? Locally or remotely?. Many questions instantly arise, including some big ones like:Īn example of a PNG bomb: a 5.8MB file inflates to 141.4GB of space. Size 300*150 pxs.A small rounded avatar and a big rectangular background cover-minimal personalization users expect from your startup today.īy now, you probably know that implementing image upload isn’t just some walk in the park. I am using same images with different sizes in my application.įorexample an image named "image_1.png" is using with the sizeġ20*60 pxs in home page and also it is using in another page with. why the package does not change the images? Optimization code, no changes would apply to the images in my sourceĬontrol.
That would do the 'image optimization' but after running my
I have problem with image optimization. Now I have two questions about image optimization I have not optimized my images before and now I have to do the optimization.
I have a laravel web application with more than thousands of uploaded images in it.