this post was submitted on 02 Aug 2026
0 points (50.0% liked)

Perchance - Create a Random Text Generator

1940 readers
16 users here now

⚄︎ Perchance

This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.

Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)

This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.

See this post for the Complete Guide to Posting Here on the Community!

Rules

1. Please follow the Lemmy.World instance rules.

2. Be kind and friendly.

  • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)

3. Be thankful to those who try to help you.

  • If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)

4. Only post about stuff related to perchance.

  • Please only post about perchance related stuff like generators on it, bugs, and the site.

5. Refrain from requesting Prompts for the AI Tools.

  • We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"
  • See Perchance AI FAQ for FAQ about the AI tools.
  • You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
  • We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

6. Search through the Community Before Posting.

  • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

founded 3 years ago
MODERATORS
 

This is a bug report about the text-to-image-plugin itself, not a prompting question.

I'm trying to use the referenceImage option (undocumented on the official plugin page, but present in the plugin's own code):

image({
  prompt: "...",
  referenceImage: { url: myUploadedUrl, blur: 0.3 }
});

Bug 1 — upload URL from perchance.org/upload fails validation Uploading via https://perchance.org/upload returns a URL like: https://user.uploads.dev/file/53997b9eaa477fc9d69ec2bc0c1d8b4f.png

But the plugin's own validation code rejects anything that doesn't start with https://user-uploads.perchance.org/ or data:. So the URL that the official upload page gives you doesn't actually work with the plugin that's supposed to accept it. Looks like the allowlist wasn't updated after the upload service's hostname changed.

Bug 2 — data: URL passes validation but never completes As a workaround, passing a data: URL directly passes validation, but then the console repeatedly throws:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('<URL>').

(~10 retries), and generation just times out with no image and no clear error. Looks like a race condition — the plugin tries to postMessage the reference image into its internal iframe before that iframe has finished navigating to the expected origin.

Questions:

  1. Is referenceImage currently supported/maintained, or experimental?
  2. What's the current correct way to get a user-uploads.perchance.org URL?
  3. Anyone seen the postMessage race before?

Happy to share console logs / generator link if useful.

you are viewing a single comment's thread
view the rest of the comments
[–] ccufcc@lemmy.world 1 points 5 days ago

Perchance has vision (i2t), ref image (i2i) is dead code, last time checked few days ago