shifr / imgwizard Goto Github PK
View Code? Open in Web Editor NEWSimple server for On-the-Fly image processing in Go
License: MIT License
Simple server for On-the-Fly image processing in Go
License: MIT License
Subj. Your /tmp will die if I want to make 100000 size variants of the site's images. Something like:
RESIZE_PARAMS_RANGE = 100x50, 420x, 800x
And disable any processing if my resize param is out of this range. Should be great.
add statistic page to get performance stats:
current active/waiting request,
received/accepted/processed requests from daemon start
> curl -I https://media.modnakasta.ua/imgw/loc/460x280/uploads/campaign/2015/07/050/d3d93a5a-ae5b-4240-b2af-c7db0c16635a_ac5201fe3f0e21da034828d97a07de3c.jpg
HTTP/1.1 404 Not Found
Server: nginx
Date: Mon, 06 Jul 2015 09:07:58 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 19
Connection: keep-alive
Add GET parameters "?crop=side1,side2". Now images are cropped by center
Something like this:
imgw1, imgw2, imgw3, imgw4
imgw1 knows about imgw2, imgw3, imgw4
imgw2 knows about imgw1, imgw3, imgw4 etc.
Therefore we can cache one file one time at one node and request each node before process resize. It prevents overcaching
Would it be possible? Serverless solution is far more reliable and cheap than servers in this case
Add config for remote media white list to prevent use your imgwizard by others
e.g.
add URL path to prevent request cache
It's possible to send request with size bigger than original. Much more bigger:
ll 133/fc3cb123-cf43-45d3-822f-472aa84f5389_546e81b73d4fbe9472b041afd9723227_1x1_41400x57600.jpeg -h
-rw-r--r-- 1 www www 46M Oct 17 13:27 fc3cb123-cf43-45d3-822f-472aa84f5389_546e81b73d4fbe9472b041afd9723227_1x1_41400x57600.jpeg
You can easily use this to overflow cache partition.
Wise solution will be - return original size if requested sizemore than original
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.