Skip to content

fluently generate asset urls for img-proxy within java

License

Notifications You must be signed in to change notification settings

rocketbase-io/imgproxy-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imgproxy-java

logo

build 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());