Missing changes
This commit is contained in:
@@ -7,12 +7,22 @@ import (
|
||||
"image/jpeg"
|
||||
_ "image/png"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
thumbnailers = append(thumbnailers, &imageThumbnailer{})
|
||||
}
|
||||
|
||||
// isImageFile reports whether name is a raster image we can thumbnail and thus
|
||||
// embed on a page. Video files also carry thumbnails but are not embeddable, so
|
||||
// this keys on the image thumbnailer's own extension set rather than
|
||||
// hasThumbnail.
|
||||
func isImageFile(name string) bool {
|
||||
return (&imageThumbnailer{}).CanHandle(strings.ToLower(filepath.Ext(name)))
|
||||
}
|
||||
|
||||
type imageThumbnailer struct{}
|
||||
|
||||
func (it *imageThumbnailer) CanHandle(ext string) bool {
|
||||
|
||||
Reference in New Issue
Block a user