From 69a8baa1be1296e39a2596731209a2408770c123 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 4 Dec 2020 15:28:25 -0500 Subject: fixed a bug in fetching image previews for featured image --- app/media/views.py | 2 +- app/utils/static/image-loader.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/media/views.py b/app/media/views.py index 29d3eca..04ac11c 100644 --- a/app/media/views.py +++ b/app/media/views.py @@ -103,7 +103,7 @@ def photo_preview_json(request, pk): def thumb_preview_json(request, pk): p = LuxImage.objects.get(pk=pk) data = {} - data['url'] = p.get_image_url_by_size('admin_insert') + data['url'] = p.get_image_url_by_size('tn') data = json.dumps(data) return HttpResponse(data) diff --git a/app/utils/static/image-loader.js b/app/utils/static/image-loader.js index a2f9049..707c1c5 100644 --- a/app/utils/static/image-loader.js +++ b/app/utils/static/image-loader.js @@ -13,7 +13,7 @@ function add_images(){ var loop = Number(element.dataset.loopcounter); if (cur != "") { if (loop <= 100) { - console.log(loop); + console.log('/photos/luximage/data/admin/tn/'+cur+'/'); var request = new XMLHttpRequest(); request.open('GET', '/photos/luximage/data/admin/tn/'+cur+'/', true); request.onload = function() { -- cgit v1.2.3-70-g09d2