# How to add frontend resources for using in package/paclets?

I have some thumbnails that I want to use inside my package, which need to be loaded with FEPrivateFrontEndResource. AFAIK those assets have to be placed in .tr files in this exact directory (on macOS):

/Applications/Mathematica.app/Contents/SystemFiles/FrontEnd/TextResources

Now of course one could manually copy them over on installation, but what if I'm using PacletInstall? What are the best practices here for distribution?

• They should be placed in pacletDirPath/FrontEnd/TextResources/resource.tr. These get added to the resource path automatically by the PacletManager if FrontEnd is set in the extensions. See mathematica.stackexchange.com/a/132065/38205 for more. – b3m2a1 Dec 8 '17 at 5:20
• I believe you have my Qwant service connection installed. You can see how I handled the "SystemResources" equivalent by looking at that via: SystemOpen@PacletFind["*_Qwant"][[1]]["Location"] – b3m2a1 Dec 8 '17 at 5:22
• You can also add them to ~Applications/Your application/FrontEnd/TextResources which is what I do for modifying menus and contextual menus when my application is running – Mike Honeychurch Dec 8 '17 at 6:07

So I tossed this in a comment, but it deserves some elaboration.

The appropriate place is the "FrontEnd/TextResources" subdirectory in your paclet.

You can see how WRI does this by looking at the CloudObject paclet:

PacletFind["CloudObject"][[1]]["Location"] // SystemOpen


{"FrontEnd", Prepend -> True}


As an extension in your PacletInfo.m

CurrentValue[$FrontEndSession, {PrivatePaths, "TextResources"}]  And in fact you can see this is how the CloudObject system adds its resources: CurrentValue[$FrontEndSession, {PrivatePaths, "TextResources"}][[1]]