Skip to content

feat: Add image preview and remove action in block editor#33

Open
jojo58fr wants to merge 2 commits intoyoanbernabeu:mainfrom
jojo58fr:add-remove-button-image
Open

feat: Add image preview and remove action in block editor#33
jojo58fr wants to merge 2 commits intoyoanbernabeu:mainfrom
jojo58fr:add-remove-button-image

Conversation

@jojo58fr
Copy link

@jojo58fr jojo58fr commented Mar 8, 2026

Description

Adds image preview support in the block editor sidebar after upload, along with a dedicated Remove image action.

This change improves the image upload UX for MEDIA and LINK blocks by:

  • showing an inline preview of the selected image
  • allowing users to remove the uploaded image explicitly
  • matching the Remove image button size/style with the existing Remove Block action
  • resetting the file input so the same file can be re-uploaded without friction

Related Issue

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI improvement
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🔧 Configuration/build changes

Checklist

  • My code follows the project's code style
  • I have run npm run lint and fixed any issues
  • I have run npm run format to format my code
  • I have run npm run type-check with no errors
  • I have tested my changes locally with npm run dev
  • I have added/updated documentation if needed
  • My changes generate no new warnings

Screenshots (if applicable)

removeimage

Additional Notes

In addition to the image upload UX update, this branch also includes small repository fixes required to make the validation checks pass cleanly:

  • fixed existing React Hook dependency warnings in analytics
  • aligned the SettingsModal blocks callback prop usage in the builder
  • corrected the Spotify social platform icon typing to satisfy TypeScript

Validation completed on this branch:

  • npm run lint
  • npm run format
  • npm run type-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant