0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00
Commit graph

58 commits

Author SHA1 Message Date
Will Norris
c5b279b947 move jpeg quality to const 2014-11-19 21:59:12 -08:00
Will Norris
1bf3ccab06 remove unnecessary break statements 2014-11-19 21:57:50 -08:00
Will Norris
7d5c68c4a0 update upstart config to run as www-data user 2014-11-11 08:41:29 -08:00
Will Norris
a80158a53a add new go14-style import comment
see http://golang.org/s/go14customimport

Also rename scripts directory to etc
2014-10-11 18:18:13 -07:00
Will Norris
71a5b6ef84 update example URLs
switch from s.wjn.me to willnorris.com/api/imageproxy
2014-09-28 11:55:28 -07:00
Will Norris
1421902e42 remove golang dependency in deb file 2014-08-13 06:49:15 -07:00
Will Norris
bfbc8ff5ee remove MaxWidth and MaxHeight options
These were originally added to prevent a denial of service caused by
requesting very large images,  but are no longer needed since we no
longer resize images larger than their original size.
2014-08-06 08:47:41 -07:00
Will Norris
a74e590181 restructure imageproxy package
- move binary from imageproxy.go to cmd/imageproxy/main.go
- move proxy package up to top level
2014-07-30 18:23:43 -07:00
Will Norris
c5b89e481c update URL for example image 2014-07-06 14:43:01 -07:00
Will Norris
98d762ef7a bump to v0.2.0 2014-07-02 07:42:38 -07:00
Will Norris
c420b5342e rename readme.md to README.md 2014-06-29 17:30:24 -07:00
Will Norris
919fdfbb78 relocate package to willnorris.com/go/imageproxy 2014-06-29 14:33:56 -07:00
Will Norris
a19264897d bump jpeg encoding quality 2014-01-09 21:54:36 -08:00
Will Norris
e7655f13d8 log full URL on bad host error 2013-12-26 19:42:18 -08:00
Will Norris
6402de6349 allow wildcard hosts in whitelist 2013-12-26 19:36:18 -08:00
Will Norris
3c72d0b5ca never resize larger than the original image 2013-12-26 19:32:23 -08:00
Will Norris
8f7f5be71c etag and last-modified support on incoming requests
fixes #3
2013-12-26 19:07:16 -08:00
Will Norris
9837a20ddd cache transformed images
fixes #1
2013-12-26 18:31:20 -08:00
Will Norris
702a07e3b5 move emptyOptions to data.go 2013-12-26 15:04:14 -08:00
Will Norris
cc2bed6b8f move NewRequest to data.go 2013-12-26 14:38:15 -08:00
Will Norris
c3eda83ab5 add default VERSION string 2013-12-26 13:55:52 -08:00
Will Norris
67bf2f0675 rename init to scripts 2013-12-26 13:50:28 -08:00
Will Norris
0a939cc19d allow more flexibility in specifying options
Options can be specified in any order (size no longer needs to be listed
first), and may be repeated.  Duplicated options overwrite previous
values.  Technically, non-size options could already be repeated... now
size can as well.  There's really not much value to this, it's just an
side-effect of allowing any order.

fixes #5
2013-12-26 13:35:23 -08:00
Will Norris
b4ed3507e3 move option parsing tests to data_test.go 2013-12-26 13:07:17 -08:00
Will Norris
9c911bef14 add newer flags to Options string 2013-12-26 12:50:22 -08:00
Will Norris
fc8552e6b4 collapse data and transform packages into proxy 2013-12-26 12:49:50 -08:00
Will Norris
d8aa853b3d add example upstart script from s.wjn.me 2013-12-26 11:42:46 -08:00
Will Norris
3e67c64a15 update deb package config 2013-12-26 11:30:28 -08:00
Will Norris
462b70dcc2 rename to 'imageproxy' (drop 'go-' prefix) 2013-12-26 11:14:28 -08:00
Will Norris
26dde07ec0 add -version flag and goxc build config 2013-12-26 11:00:50 -08:00
Will Norris
405faae777 remove logging statement
now that httpcache hides the actual HTTP calls, this logging line
doesn't accurately reflect when the images is actually fetched.  It
would be nice to get accurate logging back again.
2013-12-26 09:07:06 -08:00
Will Norris
b109a87ece simplify transform function to only pass bytes 2013-12-26 08:31:52 -08:00
Will Norris
b4fae2dd5f properly resize when one dimension is specified 2013-12-26 08:31:52 -08:00
Will Norris
1db6456329 add cacheDir for specifying disk cache dir 2013-12-26 08:31:52 -08:00
Will Norris
73f6357cda rely on httpcache for response caching 2013-12-26 08:31:52 -08:00
Will Norris
b9584c18cb remove early bail out in image trasform 2013-12-26 08:31:52 -08:00
Will Norris
a0d0260f5e remove '=' from rotate option 2013-12-07 17:06:36 -08:00
Will Norris
ae66dd52b7 update description of fit option 2013-12-06 22:25:02 -08:00
Will Norris
a039c1bbca add options to flip horizontally and vertically 2013-12-06 22:19:49 -08:00
Will Norris
d506fc6881 add support for image rotation 2013-12-06 18:03:16 -08:00
Will Norris
ea76f2d0d8 switch to Apache 2.0 license before release 2013-12-06 17:40:35 -08:00
Will Norris
b165ea8f12 update documentation for options 2013-12-06 17:02:11 -08:00
Will Norris
cd1112f7ac allow percentage sizes
change height and width options to be floats, and interpret values
between 0 and 1 to be percentages.  For example, an options strings of
"0.5x" specifies 50% width and proportional height.
2013-12-06 15:03:17 -08:00
Will Norris
036d0c51c4 allow setting max height and width
This is primarily added to prevent a denial of service attack where
insanely large images are requested, eating up CPU.
2013-12-06 14:17:39 -08:00
Will Norris
8310f6eb79 properly handle thumbnail requests
if both height and width are specified, we assume you want an image at
exactly those dimensions, so use imaging.Thumbnail, which will resize
and crop the image.

if either height or width are left unspecified, then it's just a simple
resize request.
2013-12-06 12:06:01 -08:00
Will Norris
2794d47390 accept "fit" option
this also relaxes option parsing to never return an error.  In cases
where options are not able to be parsed, they are silently ignored.
2013-12-06 11:12:57 -08:00
Will Norris
805aa606ca image transformation improvements
- switch to disintegration/imaging library, which supports more of the
  transformations I want to add
- pass image through untouched if provided Options are empty
2013-12-06 09:23:04 -08:00
Will Norris
fde104a7a1 allow options path segment to be omitted 2013-12-05 08:31:19 -08:00
Will Norris
45d07f2378 add support for image resizing 2013-12-04 23:45:06 -08:00
Will Norris
f6f757a75d rename Transform back to Options 2013-12-04 23:12:44 -08:00