Rock on!
As you knew from the beginning it was a case sensitive problem.
The folders were created correctly, the download links were correct but when creating the path for the new image to be stored I forgot to add string.lower:
local path = "assets/images/" .. string.lower(image.category) .. "/"
So the categories was always returned as “Fruits”, “Animals” etc.
Thanks Rob!
Best regards,
Tomas