diff options
| author | Yuval Adam <yuval@y3xz.com> | 2015-06-13 00:41:53 +0300 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2015-06-13 00:41:53 +0300 |
| commit | 9ae25440f70d97ce33dc2b139b381a098f761349 (patch) | |
| tree | b18edc4b6b7b0e1fa4b2622e34ef5e5124df152b /client | |
| parent | 25206e29512d99b059bc48e0718e88205d07ae4a (diff) | |
Image proxy is WORKING
Diffstat (limited to 'client')
| -rw-r--r-- | client/button.js | 3 | ||||
| -rw-r--r-- | client/templates/photos.html | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/client/button.js b/client/button.js index 420224d..2fabf31 100644 --- a/client/button.js +++ b/client/button.js @@ -60,6 +60,9 @@ Template.photo.helpers({ date: function () { var d = new Date(parseInt(this.created_time) * 1000); return d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear(); + }, + proxy: function (url) { + return url.replace('https://scontent.cdninstagram.com', '/imgproxy?url=') } }) diff --git a/client/templates/photos.html b/client/templates/photos.html index c87b225..41873bc 100644 --- a/client/templates/photos.html +++ b/client/templates/photos.html @@ -14,7 +14,7 @@ <template name="photo"> <div class="photo"> <div class="title">{{date}}</div> - <img id="img-{{id}}" src="{{images.thumbnail.url}}" crossorigin="anonymous"> + <img id="img-{{id}}" src="{{proxy images.thumbnail.url}}" crossorigin="anonymous"> <canvas id="canvas-{{id}}" style="display: none;"></canvas> </div> </template> |
