After some time, I realized I have to make the images public. Because I only wanted to make the product images public and not the other images, I used Carrierwave and added the following to my uploader file.
configure do |c|
c.fog_public = true # or false
end
That solved both problems. Got it from this question.