项目作者: rocketbase-io

项目描述 :
fluently generate asset urls for img-proxy within java
高级语言: Java
项目地址: git://github.com/rocketbase-io/imgproxy-java.git
创建时间: 2019-11-05T12:38:22Z
项目社区:https://github.com/rocketbase-io/imgproxy-java

开源协议:MIT License

下载


imgproxy-java

logo

build
Maven Central

fluently generate asset urls for img-proxy within java

example usage

  1. // simple unsigned
  2. String url = Signature.of(new SignatureConfiguration(BASE_URL))
  3. .size(300, 300)
  4. .url(SOURCE_URL)
  5. // advanced with key + salt
  6. Signature signature = Signature.of(new SignatureConfiguration(imgproxyProperties.getBaseurl(),
  7. imgproxyProperties.getKey(),
  8. imgproxyProperties.getSalt()));
  9. signature.resize(ResizeType.fit, 300, 300, true);
  10. String url = signature.url("s3://bucket-name/" + assetReference.getUrlPath());