I would like to use the new wordpress 4.4 function srcset with an image which comes from a custom-field like this
<img src="<?php $bigimg = get_post_meta($post->ID, 'bg_file', true); echo wp_get_attachment_url( $bigimg );?>" alt="">
How could I get the srcset function work with it?
wp_get_attachment_image_srcset( 380, 'medium' );
srcset is already activated for post_thumbnails in my functions.php.