[resolved] Echo attachement URL with custom size (3 posts)

  1. duncmorley
    Posted 4 years ago #

    Is it possible to echo a custom size attachment URL. I know WordPress has the following function built in:
    wp_get_attachment_url( $attachment_id );
    But you cannot add a size parameter to this function so it only ever outputs the full size image URL.

    I specifically need the URL only as I'm wanting to pass the URL into an inline CSS style.

  2. keesiemeijer
    Posted 4 years ago #

  3. duncmorley
    Posted 4 years ago #

    Nice one, worked a treat, thanks

Topic Closed

This topic has been closed to new replies.

About this Topic