Gallery_image_reference block doesn't support custom shared gallery images in azure

we are trying to create vm in dev test lab using custom image. it’s giving error platform image not found may be becausegallery_image_reference block in the azurerm_virtual_machine resource does not support referencing custom images. It is specifically designed to reference gallery images in Azure.

Can anyone help here ??