Home › Forums › Backend Issues (wp-admin) › Images URL & ID ! › Reply To: Images URL & ID !
Yes, that’s what I want ! 🙂
Else, I’ve tested another way :
<?php $attachment_id = get_field('image'); $size = "img-thumb"; // (thumbnail, medium, large, full or custom size) $size2 = "large"; $image = wp_get_attachment_image_src( $attachment_id, $size ); $image2 = wp_get_attachment_image_src( $attachment_id, $size2 ); // url = $image; // width = $image; // height = $image; ?> <a href=<?php echo $image2; ?> class="ai-thumb" rel="lightbox"> <span class="ititle"><?php the_field('titre'); ?></span> <img src=<?php echo $image; ?> /> </a>
And it works too 🙂
Thanks a lot !
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🗓️ Just one more day until the next session of ACF Chat Fridays! Make sure to register for the latest updates on what’s coming in ACF 6.1!— Advanced Custom Fields (@wp_acf) March 30, 2023
📆 Friday 31st March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/7xtEJakeQN
© 2023 Advanced Custom Fields.