yanue/nginx-lua-GraphicsMagick là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 173 sao, viết chủ yếu bằng Objective-C. 类似淘宝图片,用Lua脚本实现的自定义图片尺寸,动态生成缩略图
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
server{
listen 80
# set var for thumb pic
set $upload_path /opt/uploads;
set $img_original_root $upload_path;# original root;
set $img_thumbnail_root $upload_path/cache/thumb;
set $img_file $img_thumbnail_root$uri;
# like:/xx/xx/xx.jpg_100-.jpg or /xx/xx/xx.jpg_-100.jpg
location ~* ^(.+\.(jpg|jpeg|gif|png))_((\d+\-)|(\-\d+))\.(jpg|jpeg|gif|png)$ {
root $img_thumbnail_root; # root path for croped img
set $img_size $3;
if (!-f $img_file) { # if file not exists
add_header X-Powered-By 'Nginx+Lua+GraphicsMagick By Yanue'; # header for test
add_header file-path $request_filename; # header for test
set $request_filepath $img_original_root$1; # origin_img full path:/document_root/1.gif
set $img_size $3; # img width or height size depends on uri
set $img_ext $2; # file ext
content_by_lua_file /etc/nginx/lua/autoSize.lua; # load lua
}
}
# like: /xx/xx/xx.jpg_100x100.jpg
location ~* ^(.+\.(jpg|jpeg|gif|png))_(\d+)+x(\d+)+\.(jpg|jpeg|gif|png)$ {
root $img_thumbnail_root; # root path for croped img
if (!-f $img_file) { # if file not exists
add_header X-Powered-By 'Nginx+Lua+GraphicsMagick By Yanue'; # header for test
add_header file-path $request_filename; # header for test
set $request_filepath $img_original_root$1; # origin_img file path
set $img_width $3; # img width
set $img_height $4; # height
set $img_ext $5; # file ext
content_by_lua_file /etc/nginx/lua/cropSize.lua; # load lua
}
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
}
nginx fastdfs配置
server{
listen 80;
server_name xxx.com;
set $img_thumbnail_root /opt/fastdfs/thumb; #set thumb path
set $img_file $img_thumbnail_root$uri; #thumb file
# like:/pic/M00/xx/xx/xx.jpg_100-.jpg or /pic/M00/xx/xx/xx.jpg_-100.jpg
location ~* ^(\/(\w+)(\/M00)(.+\.(jpg|jpeg|gif|png)))_((\d+\-)|(\-\d+))\.(jpg|jpeg|gif|png)$ {
root $img_thumbnail_root; # root path for croped img
set $fdfs_group_root /opt/fastdfs/$2/store0/data; #set fastdfs group path $2
if (!-f $img_file) { # if thumb file not exists
add_header X-Powered-By 'Nginx+Lua+GraphicsMagick By Yanue'; # header for test
add_header file-path $request_filename; # header for test
set $request_filepath $fdfs_group_root$4; # origin_img full path:/document_root/1.gif
set $img_size $6; # img width or height size depends on uri : img size like "-100" or "100-", "-" means auto size
set $img_ext $5; # file ext
content_by_lua_file /etc/nginx/lua/autoSize.lua; # load auto width or height crop Lua file
}
}
# like:/pic/M00/xx/xx/xx.jpg_200x100.jpg
location ~* ^(\/(\w+)(\/M00)(.+\.(jpg|jpeg|gif|png))_(\d+)+x(\d+)+\.(jpg|jpeg|gif|png))$ {
root $img_thumbnail_root; # root path for croped img
set $fdfs_group_root /opt/fastdfs/$2/store0/data; #set fastdfs group path $2
if (!-f $img_file) { # if thumb file not exists
add_header X-Powered-By 'Nginx+Lua+GraphicsMagick By Yanue'; # header for test
add_header file-path $request_filename; # header for test
set $request_filepath $fdfs_group_root$4; # real file path
set $img_width $6; # img width
set $img_height $7; # img height
set $img_ext $5; # file ext
content_by_lua_file /etc/nginx/lua/cropSize.lua; # load crop Lua file
}
}
location /pic/M00 {
alias /opt/fastdfs/pic/store0/data;
ngx_fastdfs_module;
}
location /chat/M00 {
alias /opt/fastdfs/chat/store0/data;
ngx_fastdfs_module;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
}
yanue/nginx-lua-GraphicsMagick có 173 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/yanue/nginx-lua-GraphicsMagick. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
yanue/nginx-lua-GraphicsMagick có những chủ đề gì?
GitHub topics của yanue/nginx-lua-GraphicsMagick: "fastdfs", "graphicsmagick", "lua", "nginx", "nginx-lua-graphicsmagick". TopGit xếp repo vào nhóm mã nguồn mở.
yanue/nginx-lua-GraphicsMagick còn đang phát triển không?
Commit gần nhất trên yanue/nginx-lua-GraphicsMagick là 9.3 năm trước (theo timestamp GitHub). Repo có 64 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
yanue/nginx-lua-GraphicsMagick là gì?
yanue/nginx-lua-GraphicsMagick (yanue/nginx-lua-GraphicsMagick) là dự án Objective-C trên GitHub. Theo mô tả gốc: 类似淘宝图片,用Lua脚本实现的自定义图片尺寸,动态生成缩略图
yanue/nginx-lua-GraphicsMagick viết bằng ngôn ngữ gì?
yanue/nginx-lua-GraphicsMagick chủ yếu viết bằng Objective-C. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc nginx-lua-GraphicsMagick có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về nginx-lua-GraphicsMagick.