Original query:

EXPLAIN ANALYZE SELECT  "images".* FROM "images" 
INNER JOIN "locations" ON "locations"."id" = "images"."location_id" 
INNER JOIN "user_groups" ON "user_groups"."user_id" = "images"."creator_id"
WHERE "images"."deleted_at" IS NULL 
AND "images"."status" = 2 
AND user_groups.group_id = 5
AND "images"."creator_type" = 'User' 
AND "locations"."active" = TRUE 
ORDER BY date_uploaded DESC
LIMIT 50 
OFFSET 0