Image size in response
Options
![Anna Sho](https://us.v-cdn.net/6037124/uploads/userpics/9J2BDR93V3FA/nAMOURF2V6E1B.jpeg)
Anna Sho
Member ✭
I want to have response image array with "?tpl=med" included in URL
Im using Draftbit as FE & I havent found how to change it on FE so would be nice to have it from Xano side.
[Screenshot 2022-01-04 at 09.14.59.png]
Can you please suggest how to add this to endpoint. Thank you.
Im using Draftbit as FE & I havent found how to change it on FE so would be nice to have it from Xano side.
[Screenshot 2022-01-04 at 09.14.59.png]
Can you please suggest how to add this to endpoint. Thank you.
Comments
-
I use concatenate to add the "?tpl=med" to a URL. Here's an example that also has "box" and turns the image into a .jpg.
[CleanShot 2022-01-04 at 10.00.45@2x.jpg] -
Thanx! One more question. how do you update that variable ? can you share screenshot? I need to figure out what to do here
[Screenshot 2022-01-04 at 19.28.51.png] -
- what you have is an object array (list), nested inside an object array.
Almost anytime you are dealing with arrays/list and want to manipulate or transform them, you must loop through them...
In this case, I would do a
For Each Loop
var: products.photo as item
Update variable
item.url
concat filter - the tpl argument you want to use. -
thank you. Ive tried but looks like there should be different solution because I have array of photos for each product, and now it returns photos array separately not for each product. Can you suggest how to do loop inside the loop? I tried and it didt work..
[Screenshot 2022-01-05 at 07.57.41.png][Screenshot 2022-01-05 at 07.57.50.png][Screenshot 2022-01-05 at 07.57.29.png] -
can you help with this? I have Object Array variable and I cannot manipulate with lower node...
-
- you actually need two loops because you have two lists:
-
Thank you very much for detailed explanation!! And I've finally figured out problem - I have external paging for all of my lists and such loop example is not working for that paging option.
So I've added to products_1 table that you've cloned and it stops working wen added paging and works when I turn it down.
🙏 last question from me on this topic: what to add to your example so loop will go through items & will skip pagination ??
[Screenshot 2022-01-07 at 22.11.53.png]
[Screenshot 2022-01-07 at 22.09.59.png]
And huge thanx to you for paying attention to my questions. -
Your path changes now that you've added paging - notice how your results are now nested in the items array? That must be added accordingly to your paths now.
I'm not sure I understand what you mean by skip paging.
Maybe this example will help you
-
your code was working untill Ive just turned on Paging and I see list of metadata in response.
[Screenshot 2022-01-07 at 22.53.36.png]
[Screenshot 2022-01-07 at 22.54.54.png]
and when I debug I get error:
[Screenshot 2022-01-07 at 22.11.53.png] -
once again, because now your data has a different path... without paging you had a raw response, now your data is nested in the items array... you need to adjust the paths in the logic accordingly to reflect this
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback