Skip to content

"Copy URL" fails silently when using a custom image instead of an icon #444

@jdbruxelles

Description

@jdbruxelles

Hi. When using a custom image instead of a built-in icon in the icon editor, the editor itself works correctly and all modifications are applied as expected.

However, using "Copy URL" on export does not work:

  • a loading message appears indicating the copy is in progress,
  • but no URL is copied,
  • and no error message is shown.

Investigation

After checking the browser DevTools console, it appears the generated URL becomes excessively long because the application serializes the uploaded image data directly into the URL parameters.

The request eventually fails when calling:

https://ray.so/api/shorten-url?url=...

Example console output:

Access to fetch at 'https://ray.so/api/shorten-url?url=https%3A%2F%2Fwww.ray.so%2Ficon%3FfileName%3Dfavicon%26icon%3Dundefined%26backgroundRadius%3D256%26backgroundStrokeSize%3D16%26backgroundStrokeColor%3D%2523558CC7%26backgroundRadialGlare%3Dtrue%26backgroundNoiseTexture%3Dfalse%26backgroundNoiseTextureOpacity%3D25%26backgroundStrokeOpacity%3D154%26backgroundPosition%3D50%2525%252C100%2525%26backgroundSpread%3D100%26backgroundAngle%3D90%26iconSize%3D320%26iconOffsetX%3D0%26iconOffsetY%3D0%26selectedPresetIndex%3Dnull%26customSvg%3...

Expected behavior

Either:

  • uploaded images should not be embedded directly into the URL,
  • or the app should gracefully handle oversized URLs,
  • or at minimum display an explicit error message when URL generation fails.

Important

Staying under 2,000 characters is safest for compatibility. Otherwise, display an explicit error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions