summaryrefslogtreecommitdiff
path: root/contrib/fhttp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/fhttp')
-rw-r--r--contrib/fhttp/fhttp.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/fhttp/fhttp.go b/contrib/fhttp/fhttp.go
index 119e30e..cf13b25 100644
--- a/contrib/fhttp/fhttp.go
+++ b/contrib/fhttp/fhttp.go
@@ -9,6 +9,12 @@ import (
// provided URL and adding it to the PDF but not adding it to the page. Use
// Image() with the same URL to add the image to the page.
func RegisterRemoteImage(f *gofpdf.Fpdf, urlStr, tp string) (info *gofpdf.ImageInfoType) {
+ info = f.GetImageInfo(urlStr)
+
+ if info != nil {
+ return
+ }
+
resp, err := http.Get(urlStr)
if err != nil {