maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Bug]: .webp cannot be used on macro buttons using lib URI format

Open Pmofmalasia opened this issue 1 year ago • 1 comments

Describe the Bug

Attempting to use .webp files on macro buttons via tags displays only a broken link when using the addon lib:// URI method. Note, .webp works using the assetID, and other file formats work with the addon lib:// URI.

See discord messages for further context: https://discord.com/channels/296230822262865920/1279935085583401041/1281996396240572449 https://discord.com/channels/296230822262865920/905157521193455676/1282001901575082088

To Reproduce

Make an addon, add a .webp image to it Try and set any macro label to show that image using the lib:// URI. See broken link.

Expected Behaviour

.webp images being displayed.

Screenshots

No response

MapTool Info

1.15.0

Desktop

Windows 10

Additional Context

No response

Pmofmalasia avatar Sep 09 '24 01:09 Pmofmalasia

Could this be something in the parser and not "MapTool" code direct? Or if a more Sr. Dev wants to point me in a direction as I'm not seeing where in the "code" this sort of anomaly would come into play :(

Jmr3366 avatar Oct 18 '24 11:10 Jmr3366

Not a bug. Read the specs An asset:// points to a cached image, which has been loaded through MTs convoluted gut and is served as png not a webp

bubblobill avatar Feb 05 '25 14:02 bubblobill

So... Can I just change this to a freq instead of closing it? I'd like to be able to use the same file for a token image and macro button image (which is where this issue originated) instead of needing a .webp and .png copy of every single asset. If running it through MapTool's convoluted gut is what it takes, that's fine by me

Pmofmalasia avatar Feb 05 '25 23:02 Pmofmalasia

So... Can I just change this to a freq instead of closing it? I'd like to be able to use the same file for a token image and macro button image (which is where this issue originated) instead of needing a .webp and .png copy of every single asset. If running it through MapTool's convoluted gut is what it takes, that's fine by me

I wonder if this issue goes away if, as noted by @kwvanderlinde in #5041, MT begins to "use WebP as the serialized format for image assets"?

FullBleed avatar Feb 05 '25 23:02 FullBleed

If I'm interpreting their comment correctly, I think it might be the opposite - converting to .webp as the default may (emphasis on may) cause cached assets to fail on macro buttons, since the issue is the HTML 3.2 standard and not the default MapTool file type. And cached assets currently evade that restriction by being converted into .png in the cache.

Pmofmalasia avatar Feb 06 '25 00:02 Pmofmalasia

So... Can I just change this to a freq instead of closing it?

Yes

bubblobill avatar Feb 06 '25 07:02 bubblobill

Hello it is now a feature request pls reopen (and change the label)

Pmofmalasia avatar Feb 07 '25 19:02 Pmofmalasia