# Image Lock

<figure><img src="https://3546595727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoRne7ThJaBZiwCpSKT7V%2Fuploads%2FLZxhuMiaZhHFdek2ptzO%2Fimagelock.png?alt=media&#x26;token=3788b417-c5f1-4373-a10d-346a10984efe" alt=""><figcaption></figcaption></figure>

```lua
-- Display Image
RegisterCommand('testimage', function()
    local imageUrl = "https://images.pexels.com/photos/3052361/pexels-photo-3052361.jpeg" -- Example Pexels image
    exports['moon-ui']:OpenImage(imageUrl, function(success)
        if success then
            
            print('Image opened successfully.')
        else
            print('Failed to open image.')
        end
    end, "1234") -- Pass nil instead of "1234" for no password protection
end)
```
