LocalNotifications: how to use dynamic image as 'largeIcon'?

Hey, I am building an app with VueJS/Vuetify and Capacitor for Android.

The app allows the user to create reminders for certain tasks that are linked to profiles they have created before. I managed to create LocalNotifications, but I’m struggling to add a profile picture as ‘largeIcon’.

The documentation for LocalNotification says about largeIcon:

Icons should be placed in your app’s res/drawable folder. The value for this option should be the drawable resource ID, which is the filename without an extension.

I’m able to add a largeIcon following this approach, but only if I specify it in capacitor.config.ts. It doesn’t work if I specify it from the LocalNotifications.schedule({}] function. Not the static picture from res/drawable that works well if specified in capacitor.config.ts, but even less a picture that the user has uploaded to the app previously. It works with the static picture from res/drawable, but not with a picture that the user has uploaded previously.

So how can I specify a largeIcon from the schedule method and how can I make it a picture that the user has uploaded into the app?

For other Vue components I use this approach to display the profile picture:

const image = this.profile.picture || require('@/assets/img/default-profile-picture.png')

this.profile.picture is a base64 encoded image that is stored in Vuex.

This approach works well as src for v-img for example and also as value for css background image url.

Is there any way to get this working with largeIcon in LocalNotifications as well?

Edit: I found this SO thread about the issue which discusses a solution in Java. Is there a similar solution in Capacitor/JS?

Related discussion: feat: capacitor localnotification image is not showing · Issue #430 · ionic-team/capacitor-plugins · GitHub

Question: is it possible to write files to res/drawable at runtime using Vue/JS?

It could be a workaround to write my base64 encoded string into a file and then load it from there …