Skip to content

Commit 3936660

Browse files
committed
Support defining image size
1 parent 3caa2a1 commit 3936660

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/platforms/apple/common/user-feedback/index.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ The User Feedback feature allows you to collect user feedback from anywhere insi
1919

2020
The User Feedback widget allows users to submit feedback from anywhere inside your application.
2121

22-
![An example of the User Feedback Widget on iOS](./img/user-feedback-apple-widget.png)
22+
import widget from './img/user-feedback-apple-widget.png'
23+
24+
<img src={widget} width={300} alt="User Feedback Widget" />
2325

2426
### Pre-requisites
2527

src/mdx.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,11 @@ export async function getFileBySlug(slug: string): Promise<SlugFile> {
655655
// for this specific slug easily
656656
options.outdir = assetsCacheDir || outdir;
657657

658+
// Ensure file-loader URLs are absolute from the public folder so
659+
// imported image paths do not end up page-relative (which breaks <img src={imported}>).
660+
// With this, imports will resolve like "/mdx-images/<name>-<hash>.<ext>".
661+
options.publicPath = '/mdx-images';
662+
658663
// Set write to true so that esbuild will output the files.
659664
options.write = true;
660665

0 commit comments

Comments
 (0)