gothumbor

package module
v0.0.0-...-6c51a62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 6 Imported by: 4

README

gothumbor

GoDoc

gothumbor allows easy usage of Thumbor in Go.

Using it

myKey := "my-very-secret-key"
myImageURL := "my-domain.com/static/images/fancy-image.png"
thumborOptions := gothumbor.ThumborOptions{Width: 540, Height: 480}
newURL, err := gothumbor.GetCryptedThumborPath(myKey, myImageURL, thumborOptions)

With these variables the values of:

  • newURL: AGp4diIF89Cm2ugmDGjhycikYjY=/540x480/my-domain.com/static/images/fancy-image.png
  • err: nil

License

MIT © Globo.com

Contributors

Click here to see the list of contributors.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistributedCollageFilter

func DistributedCollageFilter(orientation, alignment string, urls []string) string

func GetCryptedThumborPath

func GetCryptedThumborPath(key, imageURL string, options ThumborOptions) (url string, err error)

func GetThumborPath

func GetThumborPath(imageURL string, options ThumborOptions) (path string, err error)

Types

type ThumborOptions

type ThumborOptions struct {
	Trim    bool
	Width   int
	Height  int
	VAlign  string
	Smart   bool
	FitIn   bool
	Filters []string
	Flip    bool
	Flop    bool
	Meta    bool
	Left    int
	Top     int
	Right   int
	Bottom  int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL