how to get custom attachment url?

by Latheesh V M Villa   Last Updated May 15, 2019 08:08 AM

Is there a common method to get a custom attachment URL regardless of the plugin or custom code used?

Say if I use ACF plugin I can create an image field and get the url with get_field('fieldname');

if it is WordPress featured image i use get_the_post_thumbnail_url();

for wocoommerce it has, it's on method

if I create a custom meta field for image...is there any loop function to get the URL for the uploaded images?

like some_function('field', 'size') which is common to all the above the method?



Related Questions



Remove product category placeholder image (Woocomerce)

Updated December 13, 2018 16:08 PM

Calling attachment ID outside of loop

Updated August 30, 2017 23:08 PM

Query by attachment image size

Updated May 30, 2016 08:03 AM

wp_query get attachments in larger size

Updated June 11, 2015 02:03 AM