We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9309ace commit 0a81cb9Copy full SHA for 0a81cb9
template/types/display/image.go
@@ -17,6 +17,9 @@ func init() {
17
func (image *Image) Get(ctx *context.Context, args ...interface{}) types.FieldFilterFn {
18
param := args[2].([]string)
19
return func(value types.FieldModel) interface{} {
20
+ if value.Value == "" {
21
+ return ""
22
+ }
23
if len(param) > 0 {
24
return template.Default(ctx).Image().SetWidth(args[0].(string)).SetHeight(args[1].(string)).
25
SetSrc(template.HTML(param[0] + value.Value)).GetContent()
0 commit comments