A game I’m making currently uses and depends on lots of images from the toolbox. I need to know if these images get removed so I use/upload an alternative. Currently Roblox’s AI moderation is absolutely garbage, so anything resembling a face will get deleted for PII. Is there a non-hacky way to detect if an Image was moderated/deleted automatically?
For example, there is a picture of Lebron from the toolbox. The picture gets removed for PII, and becomes blank in the game, but retains its name and such. How do I detect this.
You can do if imageLabel.IsLoaded then '...' end but sometimes that doesn’t work
you can also use content provider, like so
local contentProvider = game:GetService("ContentProvider")
local suc, res = pcall(contentProvider.PreloadAsync, contentProvider, {imageid})
if not suc then print("image has been moderated") end
using both of those is your best option, otherwise you might need to consider downloading and loading those same images
A tricky way that comes to mind is downloading the image bytes through HTTP service or the image pixel data through Roblox image API(you can do this because the image is on the Roblox catalog). Then after downloading the image you can check if the string of its bytes/pixel data matches that of the moderated asset image(that you can store locally in the server so you don’t have to fetch it each time).
This will always gives you right results unless a user decides to be sneaky and they upload that exact image for some reason. Also you may need to update the cache of the moderated image if Roblox happens to change it.