move cover photo random method to common