Documentation ¶
Overview ¶
Package image provides an image store and resizer. It depends on convert (from imagemagick). Uploaded files are stored in original, but not served via HTTP.
store := image.Store{ CacheDir: filepath.Join(os.Getenv("CACHE_DIRECTORY"), "imagedir"), Dir: filepath.Join(os.Getenv("STATE_DIRECTORY"), "imagedir"), MaxSides: []int{300, 600, 1200}, } router.Handler(http.MethodGet, "/images/*filepath", http.StripPrefix("/images", store))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
Click to show internal directories.
Click to hide internal directories.