Hi CCIntera,
if you want no user interaction you'll need a startup script.
With an event listener that registers on afterPlace.
The following script snippet is not the real solution because it will register the event listener on the active document. So it cannot used as startup script, but it's a starting point you can work with.
FWIW: Always check the nature of event.target before doing something.
In case a placegun is loaded with an image and unloaded to a graphic frame the target becomes that graphic frame.
#targetengine "afterPlaceAGraphicToActiveDocument"
var myDoc=app.documents[0];
myDoc.addEventListener( "afterPlace" , fitGraphicContents );
function fitGraphicContents( event )
{
var myTarget = event.target;
myTarget.fit( FitOptions.CONTENT_TO_FRAME );
};
See into all options with method fit() in the DOM description for ExtendScript:
https://www.indesignjs.de/extendscriptAPI/indesign14/#FitOptions.html
Regards,
Uwe Laubender
( ACP )