Only render shadow of an image with alpha in it (Eevee)
Just use the light path node as usual.

Make your transparent material with an image texture controlling the alpha as usual.

In the last step use a Mix Shader between your setup and a Transparent Shader connect the Factor input to the Is Camera socket of a Light Path node.