Home › Forums › Front-end Issues › Cannot get srcset to output anything › Reply To: Cannot get srcset to output anything
Yes, the code does the same thing, but I am just letting WP work it out, because it’s already done and reduces how much code I need to write. Instead of using 2 functions I’m using one and not needing to do deal with the separate parts. If I was doing this so that the client could have different image proportions based on screen size then I would do this, but since I just want them all to be specific 3:2, I don’t need to.
The image tag that you are getting looks like what I’m getting and it is working. To test, load the page at a specific size, in firefox I right click and “view image”. At each size screen I see a different sized image. Also, not that the image will not be reloaded if you change the size of the screen. You need to change the size of the screen and then reload the page. Browsers will only request the image that matches the current screen size.
It seems to be working for me.
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.