Skip to content

[studio] Image Import Preview Not Displaying Uploaded Images for Noun Parts #57

@PrizemArtNFT

Description

@PrizemArtNFT

Description

When attempting to import custom images (previously exported images) for noun parts (accessory, noggles, head, body, or background) via the import/load feature, the uploaded image does not appear in the preview. Instead, only an empty grid (checkerboard pattern) is shown, making it impossible to verify the import before finalizing.

Steps to Reproduce

  1. Open the Noundry Studio app.
  2. Navigate to the import feature for any noun part (e.g., accessory, head, etc.).
  3. Upload or drag-and-drop an image file (e.g., PNG).
  4. Observe the preview area.

Expected Behavior

The uploaded image should be displayed in the preview grid, scaled appropriately to fit the canvas (e.g., 32x32 pixels), allowing users to see the image before importing it into the noun part.

Actual Behavior

The preview shows only the empty grid without the uploaded image. The import process may still complete, but without visual feedback, users cannot confirm the image was loaded correctly.

Environment

  • Browser:Chrome , Safari latest
  • OS: [e.g., macOS 14.5]
  • App Version: Latest from main branch
  • Image Format Tested: PNG (previous exported)

Additional Context

  • This affects all noun parts that support custom image import.
  • The issue appears to be in the PartImporter component, where the image is drawn to the canvas without proper scaling.
  • A potential fix involves updating the drawImage call in apps/studio/src/components/PartImporter.tsx to scale the image to the canvas dimensions.

Screenshots

Image

Related Files

  • apps/studio/src/components/PartImporter.tsx (likely the source of the issue)
  • apps/studio/src/utils/canvas/drawCanvas.ts (related canvas drawing utilities)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions