Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 977 Bytes

File metadata and controls

28 lines (18 loc) · 977 Bytes

imgproxy-java

logo

Build Status Maven Central

fluently generate asset urls for img-proxy within java

example usage

// simple unsigned 
String url = Signature.of(new SignatureConfiguration(BASE_URL))
                .size(300, 300)
                .url(SOURCE_URL)


// advanced with key + salt
Signature signature = Signature.of(new SignatureConfiguration(imgproxyProperties.getBaseurl(),
                    imgproxyProperties.getKey(),
                    imgproxyProperties.getSalt()));

signature.resize(ResizeType.fit, 300, 300, true);
String url = signature.url("s3://bucket-name/" + assetReference.getUrlPath());