thank you, it worked now.
Another question, why is it when the action is “when opening” every time I open that item it resize it? Same thing with “after synchronization” any update to the file it resizes it.
it thats normal behaviour, then the action should be labeled “On open very time”
The script attached is to resize image