I am having trouble figuring out if the following is possible with the Matrix file system.
Say I have a .jpg image, which, in php I write some text across the image, then re-save that image back into the same image location in the file system, but only as a .png file. How can I, then insert that new image, into the file system for that asset to replace the old, WITHOUT using the front-end upload?
Trying to change change the name, then delete gives me errors:
$asset->setAttrValue('name', $new_name);
That gives me errors saying that I can't change the file extension, in order to, I would need to upload the file through the front end, which I don't want to do. :)