add media url logic