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")
Click to show internal directories.
Click to hide internal directories.