382 Commits

Author SHA1 Message Date
Nova Kwok
ab4373263d
apt update before apt install (#265)
* apt update before apt install

* Fix sudo
2023-08-09 23:07:25 +08:00
Nova Kwok
6790ddda46
Add support for Go 1.21, bump version, optimize code (#264) 2023-08-09 22:49:40 +08:00
BugFest
4003b03022
Multiple backends support (#207)
* Fix: h2non/filetype upgraded to support avif signatures

* Fix: make clean updated to include test/output dirs

* Feature: multi-backend support via IMG_MAP config key as described in #217

* feat: implement both local and remote (proxyMode) mappings for multi-backend

* Feature: multi-backend support via IMG_MAP config key as described in #217

* fix: go-is-svg should be direct import

* fix: imgMap paths are relative to CWD

* feature: IMG_MAP is parsed on start

---------

Co-authored-by: Nova Kwok <n0vad3v@riseup.net>
2023-08-02 23:33:54 +08:00
Nova Kwok
5dba6bba15
M1 should be arm64 (#263) 2023-07-29 20:09:29 +08:00
Nova Kwok
9250d6f607
Optimize README.md (#262)
* Optimize README.md

* Update link
2023-07-26 15:01:13 +08:00
Nova Kwok
8ca36607ec
Add blog URL (#261) 2023-07-24 16:35:44 +08:00
Nova Kwok
cd0a83a596
Update README and config.json (#260) 2023-07-21 15:41:26 +08:00
Nova Kwok
a7b9e90fab
Add SVG support for proxy mode (#258)
* Add SVG support

* Bump version
2023-07-21 15:35:30 +08:00
Benny
5f6c7cce1e
better reduction effect loop and bump (#256)
* better reduction effect loop and bump

* Bump version

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-19 10:10:21 +08:00
Nova Kwok
b988668893
Better ReductionEffort (#255)
* Better ReductionEffort

* Bump version
2023-07-18 23:17:34 +08:00
Nova Kwok
24b96a901b
ReductionEffort to 0 (#254) 2023-07-18 16:16:14 +08:00
Benny
a7b5992662
Metadata (#251)
* recover middleware

* simplify Atoi

* metadata data prototype

* InterestingAttention

* resize itself

* Bump version to 0.9.4
Added some comments
Removed String() for Extraparams

* Add metadata test

* Fix CI

* Remove unnecessary tests

* Update file count

* use t.Run to get test case

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-11 19:08:32 +02:00
Nova Kwok
a5e3282ea1
Move matcher to outside to avoid fatal error: concurrent map read and map write (#250)
* Move matcher to outside to avoid fatal error: concurrent map read and map write

* Bump to 0.9.3
2023-07-06 22:16:24 +08:00
Nova Kwok
773424ca01
Split codecov and CI check (#249) 2023-07-06 14:49:10 +02:00
Benny
3699c4991f
fix code cov (#248) 2023-07-06 08:23:46 +08:00
dependabot[bot]
debb31d2cd
Bump github.com/gofiber/fiber/v2 from 2.46.0 to 2.47.0 (#238)
Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.46.0 to 2.47.0.
- [Release notes](https://github.com/gofiber/fiber/releases)
- [Commits](https://github.com/gofiber/fiber/compare/v2.46.0...v2.47.0)

---
updated-dependencies:
- dependency-name: github.com/gofiber/fiber/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 21:39:42 +02:00
Nova Kwok
fdca7eac0f
Bump to 0.9.2 (#247) 2023-07-05 16:01:29 +08:00
Nova Kwok
8d0ecdf4e0
Use QEMU to release ARM64 binary as well (#246) 2023-07-05 15:30:44 +08:00
Benny
a2585463ad
build binary using centos 7 (#245)
fix #236
2023-07-05 10:42:21 +08:00
dependabot[bot]
2d9b10beb9
Bump github.com/valyala/fasthttp from 1.47.0 to 1.48.0 (#235)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.47.0 to 1.48.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.47.0...v1.48.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 17:03:20 +08:00
Benny
13281d929b
add some tests (#239)
* add some tests

* remove template

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-03 17:01:13 +08:00
Nova Kwok
eea4537f22
iOS 16 supports AVIF and WebP (#242)
* iOS 16 supports AVIF and WebP

* iOS 17 should support WebP and AVIF too

* Determine image type by GetFileContentType
2023-07-03 16:57:47 +08:00
Nova Kwok
77584df0ea
update README (#241) 2023-06-30 07:59:55 +02:00
Nova Kwok
2b67e6dcb8
Update README.md (#240)
* Update README.md

* Fix typo
2023-06-29 23:32:56 +08:00
Benny
451f9a4145
update README.md (#237)
* update README.md

* #234
2023-06-28 14:56:33 +08:00
Benny
23bbed8ce6
Refactor review (#220)
* runnable

* convert is working

* some refactoring

* update go.mod

* fix some TODOs

* add TODO

* update go mod

* rebase onto master

* fix #234

2: 5.9s - 7.6MB
4: 26s - 6.9MB

* fix malloc tests

* fix malloc tests

* remote TODO

* add X-Real-IP #236

* Better localRawImagePath

* remove some wrong comments

* Bump version to 0.9.0

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-06-27 15:43:43 +02:00
Nova Kwok
a8090ff47e
Ignore sisze when source is GIF (#233)
* Ignore sisze when source is GIF

* error strings should not be capitalized (ST1005)
2023-06-15 17:10:53 +08:00
Nova Kwok
2c0dd15222
Now we support animated GIF images (#232)
* Now we support animated GIF images

* Fix CI

* Update runtime image
2023-06-15 15:28:59 +08:00
Zhou Zhiqiang
90680bef6c
feat: automatic load pages in animated images (#231)
* feat: automatic load pages in animated images

Signed-off-by: STRRL <im@strrl.dev>

* chore: remove destination file during test

Signed-off-by: STRRL <im@strrl.dev>

* chore: change import param code style

Signed-off-by: STRRL <im@strrl.dev>

---------

Signed-off-by: STRRL <im@strrl.dev>
2023-06-15 14:08:08 +08:00
Nova Kwok
f5eda9eaed
Change Stripe link to another account (#225) 2023-06-08 16:31:28 +08:00
dependabot[bot]
e3a0ff8386
Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#224)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 11:50:05 +08:00
Nova Kwok
dc9b6cd8b2
Bump to 0.8.4 (#223) 2023-05-31 20:14:04 +08:00
n0vad3v
97613832ef Add integration tests 2023-05-31 12:51:43 +02:00
n0vad3v
cd06d4ca0a Add libjemalloc2 and libtcmalloc-minimal4 to Dockerfile 2023-05-31 12:51:43 +02:00
dependabot[bot]
a70e2b3f98
Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#221)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 16:49:43 +08:00
Nova Kwok
9268ada0b3
A better way to handle remote content-type, fix etag (#216)
* A better way to handle remote content-type, fix etag

* Check for err

* Optimize on fetchRemoteImage

* Write 600 permission

* Implement simple lock for write operation

* Removing typo

* Removing typo

* Setup cache

* Fix CI

* Fix retry and remove genEtag

* Fix error note

* remove duplicate Get

* WTF

* Fix tests

* remove broken test

* Fix broken tests
2023-05-29 19:41:39 +08:00
BugFest
c66fccfffd
Implement fiber etag middleware to replace etag generation (#218) 2023-05-29 14:55:11 +08:00
Nova Kwok
c61ed7da6b
Allow convert on abnormal image (#212)
* Allow convert on abnormal image

* Bump to 0.8.2

* Remove usless line
2023-05-22 21:47:53 +08:00
Nova Kwok
156fab9b6b
Should return original image when convert failed (#209) 2023-05-20 18:00:39 +08:00
Vadim
9138e3d67a
prevent image rotation (#205) 2023-05-20 14:33:25 +08:00
dependabot[bot]
227d2bf39d
Bump github.com/sirupsen/logrus from 1.9.1 to 1.9.2 (#201)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.1...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-19 17:15:14 +08:00
dependabot[bot]
c2f70544ba
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#202)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-19 17:09:53 +08:00
Nova Kwok
e64ded7f47
Better RAM usage (#200)
* Manually close image for GC

* Remove config

* Handle error by os.Stat

* Add more test on fetchRemoteImage

* refine TestGenOptimizedAbsPath

* Bump version to 0.8.1
2023-05-19 17:07:58 +08:00
Nova Kwok
651ae512a3
Enhance code (#199)
* Enhance code

* Fix wrong comment

* Add cURL test

* Add TestResizeImage

* Close response body
2023-05-17 20:50:02 +08:00
dependabot[bot]
416c7816ba
Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.1 (#196)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 19:15:20 +08:00
BugFest
ccc99e2e1c
Enable AVIF compression in proxy mode (#194)
* Enable AVIF compression in proxy mode

* Fix AVIF in proxy mode PR after PR#192 merge

* Bump version to 0.8.0
2023-05-17 19:11:58 +08:00
Nova Kwok
96802dc3bc
Update README (#195) 2023-05-15 21:43:29 +08:00
Nova Kwok
bcb3f1452b
Support extra parameters on request (#192)
* version 1

* some update

* Fix ST1020

* Remove ST1020

* Fix CI

* Fix params

* Fix order

* Allow reqURIwithQuery pass through when proxy mode

* Fix bugs

* Extract resizeImage

* Check for err
2023-05-15 20:13:00 +08:00
Nova Kwok
bfa8aae10c
Try using vips (#190)
* Try using vips

* No need libaom

* Update code and version

* update

* Fix CI

* Add sudo

* Fix CI

* Make CI happy

* we happy few

* Update README, fix CI

* Add --no-install-recommends

* Update code

* Add ca-certificates for proxymode

* Add pics/invalid.png for testing

* Update README

---------

Co-authored-by: Benny <benny.think@gmail.com>
2023-05-10 10:52:36 +08:00
dependabot[bot]
882dc98056
Bump github.com/valyala/fasthttp from 1.46.0 to 1.47.0 (#189)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.46.0 to 1.47.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.46.0...v1.47.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-02 11:07:04 +08:00