If I’m understanding the docs for attachment loop fields, it says “url - Accepts optional attribute “size” for image size.” So size is an optional attribute that works with the url attribute. In your first example, you have a url attribute so the size attribute works, but in your second example, you aren’t actually using the url attribute so that’s why it’s not working. I’m not sure if this is a technical limitation or if simply an oversight when the team designed that Field acf_image shortcut so I’ll check in with the devs to see if it’s possible to allow that second syntax to work. Hopefully this explains why it currently doesn’t work.
Fine analysis, thank you.
You’re probably right about the logic underlying, and it’s not a big deal given the first syntax works alright (despite it’s less compact than the second one ;-).