How do I attach a PDF to a product in Magento 2?
Magento 2 has no built-in way to add PDFs or other files to a product page. With Product Attachments you upload the PDF under Product Attachments > Attachments, add it to an attachment group and assign the group to your products. The PDF then appears with a Download button in a Downloads tab or another position you choose, with no coding.
Can I add a Downloads tab to the Magento 2 product page?
Yes. Choose the "Product tab" position and attachments are shown in a new tab next to Details and Reviews. You can rename the tab, for example to "Documents" or "Manuals". Groups can also appear after the product title, after the short description, or before or after the tabs.
What is the difference between a downloadable product and product attachments?
A Magento downloadable product sells a file: the customer gets the download link after paying. Product attachments are free documents shown on any product type, such as a simple or configurable product: manuals, data sheets, warranty certificates, drawings and videos that help shoppers decide before buying.
Can I restrict downloads to logged-in customers or customer groups?
Yes. Each attachment and each group can be open to everyone, to logged-in customers only, or to chosen customer groups such as Wholesale or Installers. The rule is checked on the server for every download. Guests see a lock with "Log in to access", or you can hide restricted files completely.
Which file types can I upload?
PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, ZIP, JPG, JPEG, PNG and WEBP by default, up to 20 MB per file. You can change the list and the size limit in the configuration. Scripts and executable files are always refused, and the content of each file is checked against its extension.
Can I add product videos from YouTube or Vimeo?
Yes. Add a YouTube, Vimeo or direct MP4, WEBM or OGG link as a video attachment. Shoppers click Watch Video and the video plays in a popup. Nothing is loaded from YouTube or Vimeo until they press play, and YouTube uses its no-cookie domain.
Can I attach the same file to many products at once?
Yes. Attachments are organised in groups, and one group can be assigned to any number of products from a filterable product grid. When you replace a file, every product that uses it shows the new version.
Can people open the uploaded files directly or find them in Google?
No. Files are stored under random names in a protected folder and are only served through a download link that checks the store view and the customer's access. Downloads are sent with a noindex header so search engines do not index them. On nginx, one deny rule from the installation guide is needed.
Does it work with multiple store views and the full page cache?
Yes. Attachments and groups can be limited to store views, for example to show a manual in each language, and product pages stay in Magento's full page cache. Titles and descriptions are the same in every store view, so for another language you create a separate attachment.
Which Magento versions and themes does it support?
Magento Open Source and Adobe Commerce 2.4.8 and 2.4.9, with PHP 8.2 to 8.4, on Luma, Blank and Luma-based themes. On Hyvä the Downloads tab works, but the attachments are not styled and videos open as links; a Hyvä compatibility module is planned.
Is there a REST API?
Yes. Document types, attachments and groups, file uploads and product assignments are all available through the Magento REST API, with their own ACL permissions.
What support do I get after purchase?
Every purchase includes 3 months of support. You can extend it to 6 or 12 months at checkout, and add professional installation.