imageprovider

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageProvider

type ImageProvider struct {
	// contains filtered or unexported fields
}

func NewImageProvider

func NewImageProvider(thumbnailPathProvider paths.Pather, thumbnailIndex *thumbnail.Index) *ImageProvider

func (*ImageProvider) GetImagePath

func (provider *ImageProvider) GetImagePath(imagePathProvider paths.Pather, fileRoute route.Route) string

GetImagePath returns the image path for the given file route. If one or more thumbnais exist it will return the thumbnail path (e.g. srcset="/thumbnails/105-D6134C1B-320-240.png 320w, /thumbnails/105-D6134C1B-640-480.png 640w, /thumbnails/105-D6134C1B-1024-768.png 1024w"). If there is no thumbnail is will just return the canonical image path (e.g. src="document/files/sample.png")

Jump to

Keyboard shortcuts

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