Home › Forums › Front-end Issues › Image field not outputting srcset attribute with image ID › Reply To: Image field not outputting srcset attribute with image ID
I don’t have any that match 1366×400, but one that does come close. Here are all my sizes:
add_image_size( 'carousel', 1366, 500, true ); // Upload @ 2732px by 1000px for @2x
add_image_size( 'hero', 1366, 400, true ); // Upload using carousel dimensions or @ 2732px by 800px for @2x if the image is too cropped
add_image_size( 'hero-small', 768, 400, true ); // Upload using carousel dimensions or @ 1536px by 800px for @2x
add_image_size( 'large-square', 424, 368, true ); // Upload @ 848px by 736px for @2x
add_image_size( 'medium-square', 289, 256, true ); // Upload @ 578px by 512px for @2x
add_image_size( 'small-square', 215, 170, true ); // Upload @ 430px by 340px for @2x
add_image_size( 'diagram', 650 ); // Upload @ 1300px by any height for @2x
add_image_size( 'full-width', 920 ); // Upload @ 1840px by any height for @2x
add_image_size( 'full-width-cropped', 920, 337, true ); // Upload using full-width dimensions or @ 1840px by 674px for @2x if the image is too cropped
add_image_size( 'half', 436 ); // Upload @ 872px by any height for @2x
add_image_size( 'third', 275 ); // Upload @ 550px by any height for @2x
add_image_size( 'quarter', 195 ); // Upload @ 390px by any height for @2x
I appreciate this question is out of scope, so no worries if you can’t help any further.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.