Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
[api](Unsplash Api) trying to generate random pictures for my testing database

I'm using a nodejs package called casual Which basically lets one generate random data

Im defining this method for generating imgs

casual.define('portrait', () => ({
 uri: `https://source.unsplash.com/collection/9948714?sig=${casual.integer(1, 100)}` 
}));

From this, I create an array of images like this :

[
  {"uri":"https://source.unsplash.com/collection/9948714?sig=37"},
  {"uri":"https://source.unsplash.com/collection/9948714?sig=32"},
  {"uri":"https://source.unsplash.com/collection/9948714?sig=91"},
]

I'm supposed to get a different image each time, but the PROBLEM is that I get the same picture 3 times, even with the sig.

What I'm I doing wrong?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

[SOLVED]

casual.define('portrait', () => ({
 uri: `https://source.unsplash.com/collection/9948714?${casual.integer(1, 100)}` 
}));

generating

[
  {"uri":"https://source.unsplash.com/collection/9948714?37"},
  {"uri":"https://source.unsplash.com/collection/9948714?32"},
  {"uri":"https://source.unsplash.com/collection/9948714?91"},
]

just adding a number instead of sig=number worked

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!