diff --git a/src/queries.js b/src/queries.js index d0a8bd3..338c3a4 100644 --- a/src/queries.js +++ b/src/queries.js @@ -19,8 +19,8 @@ export function do_image_query(query, database, collection_path, collection_thum var cols = res[0].columns; var data = res[0].values; data.forEach(row => { - var imagepath = process.env.PUBLIC_URL + collection_path + "/" + row[cols.indexOf("relativePath")] + "/" + row[cols.indexOf("name")]; - var thumbpath = process.env.PUBLIC_URL + collection_thumbs_path + "/" + row[cols.indexOf("uniqueHash")] + ".jpg"; + var imagepath = encodeURI(collection_path + "/" + row[cols.indexOf("relativePath")] + "/" + row[cols.indexOf("name")]); + var thumbpath = encodeURI(collection_thumbs_path + "/" + row[cols.indexOf("uniqueHash")] + ".jpg"); photos.push( create_photo( row[cols.indexOf("id")],