JavaScript for WordPress › Forums › Bugs & Issues › Broken gallery block – Advanced Gutenberg Course › Reply To: Broken gallery block – Advanced Gutenberg Course
January 2, 2021 at 3:52 am
#148928
Participant
Hi Zac,
Looks like the way that you get the various sizes has changed again in Gutenberg and we now need to use the media_details object. Something like:
img.media_details.sizes.thumbnail.source_url
However i get this error:
Uncaught TypeError: can't access property "sizes", img.media_details is undefined
Any thoughts where I am going wrong?
Cheers
Chris