Object library in Blueprints or from c++

In order to do that you first need to Cast the object to a Texture2D.