diff --git a/backend/app/cmd/server.go b/backend/app/cmd/server.go
index cd1ca5c0..20b5c9d7 100644
--- a/backend/app/cmd/server.go
+++ b/backend/app/cmd/server.go
@@ -238,6 +238,7 @@ func (s *ServerCommand) newServerApp() (*serverApp, error) {
if err != nil {
return nil, errors.Wrap(err, "failed to make pictures store")
}
+ log.Printf("[DEBUG] image service for url=%s, ttl=%v", imageService.ImageAPI, imageService.TTL)
dataService := &service.DataStore{
Interface: storeEngine,
@@ -453,7 +454,8 @@ func (s *ServerCommand) makePicturesStore() (*image.Service, error) {
MaxHeight: s.Image.ResizeHeight,
MaxWidth: s.Image.ResizeWidth,
},
- TTL: s.EditDuration + time.Second, // add extra second to image TTL for staging
+ ImageAPI: s.RemarkURL + "/api/v1/picture/",
+ TTL: s.EditDuration + time.Second, // add extra second to image TTL for staging
}, nil
}
return nil, errors.Errorf("unsupported pictures store type %s", s.Image.Type)
diff --git a/backend/app/store/image/image_test.go b/backend/app/store/image/image_test.go
index 157dce5f..2a8ffb08 100644
--- a/backend/app/store/image/image_test.go
+++ b/backend/app/store/image/image_test.go
@@ -17,7 +17,7 @@ import (
func TestService_ExtractPictures(t *testing.T) {
svc := Service{ImageAPI: "/blah/"}
html := `blah
foo
-
xyz
123
`
+
xyz 123
`
ids, err := svc.ExtractPictures(html)
require.NoError(t, err)
assert.Equal(t, 2, len(ids), "two images")