nginx-lua-fastdfs-GraphicsMagick 动态生成缩略图

来源:互联网 发布:淘宝商城女装冬装外套 编辑:程序博客网 时间:2024/05/22 17:01
https://github.com/hpxl/nginx-lua-fastdfs-GraphicsMagick

利用nginx lua 获取fastdfs的原图,存放原图到本地,根据不同规则url,例如:_60x60.jpg、_80x80.jpg,利用gm生成缩略图存放到本地。 第二次访问直接返回本地已生成的缩略图。 定时凌晨清除一段时间内未访问的图片,节省空间。

图片访问举例

http://192.168.1.113/group1/M00/00/00/wKgBcVN0wDiAILQXAAdtg6qArdU189.jpg
http://192.168.1.113/group1/M00/00/00/wKgBcVN0wDiAILQXAAdtg6qArdU189.jpg_80x80.jpg
http://gi1.md.alicdn.com/imgextra/i1/401612253/T2ASPfXE4XXXXXXXXX_!!401612253.jpg_60x60.jpg
参考网址

https://github.com/openresty/lua-nginx-module
https://github.com/azurewang/Nginx_Lua-FastDFS
https://github.com/azurewang/lua-resty-fastdfs
http://rhomobi.com/topics/23
http://bbs.chinaunix.net/thread-4133106-1-1.html

希望可以给你一些思路。
0 0
原创粉丝点击