resize media for media page