How to Change Default Display Size in SharePoint File and Media Web Part
Question details
The user wants to change the default display size of linked files in the SharePoint File and Media web part from 'Window width' to 'Window size'.
- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Embedding and displaying documents or media files on a SharePoint page using the File and Media web part.
- Observed behavior
- The web part defaults to adjusting the linked file's display size based on 'Window width' rather than maintaining the file's inherent 'Window size'.
Ensure you have edit permissions for your SharePoint site's pages to access and view web part configuration properties.
Understand Web Part Limitations and Submit Feedback
SharePoint Online currently lacks a built-in option to change the default display size to Window size for this specific web part, but you can submit a feature request.
Microsoft SharePoint's File and Media web part is inherently designed to dynamically adjust to the window width. This ensures a responsive design that fits correctly across various devices and screen sizes.
Because there is no out-of-the-box configuration to force the web part to use the exact 'Window size' of the linked file, the official recommendation is to provide feedback directly to the product team.
Navigate to your SharePoint page, click 'Edit' in the top right corner, and select the File and Media web part. Click the pencil icon to review all currently available property settings.
Notice that you can adjust page section layouts (like one column or two columns) to constrain the web part, but the component will always natively default to filling the column's window width.
Go to the Microsoft SharePoint Feedback Portal online. Submit a formal request asking for a 'Window size' display toggle to be added to the File and Media web part.
Looking for a Better Way to Manage and Edit Office Documents?
While SharePoint has specific display limitations for embedded files, managing your documents offline doesn't have to be restrictive. WPS Office provides a powerful, highly compatible, and lightweight suite for creating, editing, and sharing your documents seamlessly before you upload them to the web.
- 1. Download WPS Office: Visit the official WPS website to download the free office suite compatible with your operating system.
- 2. Install the Application: Run the downloaded installer and follow the quick on-screen instructions to set up WPS Office on your computer.
- 3. Edit Your Documents: Launch WPS Office to easily open, edit, and format your existing Microsoft Office files without losing your preferred layout.

Frequently Asked Questions
Can I use custom CSS to force the SharePoint File and Media web part to a specific size?
Standard modern SharePoint Online pages do not support custom CSS injection out-of-the-box. Modifying the underlying CSS styles requires deploying a custom SharePoint Framework (SPFx) extension, which requires development knowledge.
Is there a different SharePoint web part I can use to strictly control document display size?
Yes. You can use the 'Embed' web part. By pasting an iframe code snippet of your document into the Embed web part, you can manually set the width and height properties (e.g., width='800px' height='600px') to control the exact display size.
Why does SharePoint force the window width setting for files and media?
SharePoint modern pages prioritize responsive web design. Forcing web parts to adjust to window width ensures that documents and videos scale appropriately when users view the page on smaller screens, such as tablets or mobile devices.
What types of files are supported by the File and Media web part?
The File and Media web part supports a wide range of file formats, including Microsoft Word documents, Excel spreadsheets, PowerPoint presentations, PDF files, and various video formats stored within your SharePoint document library.




