Skip to content
Advertisement

How can I limit the attached images shown to just one? [closed]

Given I’m using the following code:

JavaScript

How can I limit it to just show the first attached image only, rather than all of them?

Advertisement

Answer

If you only want to show first image from array, remove the foreach loop and do this:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement