How do I embed a Google Image, Form, Pdf in WordPress without the plugin?

How To Embed Google drive (Images, Forms, docs, pdf) in WordPress without Plugin.

How do I embed a Google ? Embedding Google Drive files such as images, PDFs, Docs, Sheets, and Forms in WordPress can improve accessibility and user experience. Instead of relying on plugins, you can embed these files manually using Google Drive’s built-in sharing options and iframe embedding. This method is lightweight and does not impact your website’s performance.

Why Embed Google Drive Files in WordPress?

  • Reduces server load by hosting files on Google Drive
  • Keeps your WordPress site lightweight and fast
  • Allows easy file updates without re-uploading
  • Secure file sharing with Google Drive permissions

1. Embedding Google Drive Images

Steps:

  1. Upload the image to Google Drive.
  2. Right-click the image and select Get link.
  3. Change sharing settings to Anyone with the link.
  4. Open the image in a new tab and copy the image URL.
  5. Insert the URL in the WordPress editor using the following HTML:
  6. For eg this is your url “https://drive.google.com/file/d/1NZ-2hTTjKmCUrIQXT47WIOucd7_-i12y/view?usp=drive_link”
  7. Now in the custom html add this url with iframe
  8. <iframe src=”https://drive.google.com/file/d/1NZ-2hTTjKmCUrIQXT47WIOucd7_-i12y/preview?rm=minimal” width=”100%” height=”280″ frameborder=”0″></iframe>

<iframe src=”IMAGE_URL/preview?rm=minimal” width=”100%” height=”280″ frameborder=”0″></iframe>


https://drive.google.com/file/d/1NZ-2hTTjKmCUrIQXT47WIOucd7_-i12y/view?usp=sharing

Steps:

  1. Open the Google Doc, Sheet, or Slide.
  2. Click File > Publish to the Web.
  3. Copy the provided iframe embed code.
  4. Paste it into the WordPress Custom HTML block:
  5. For eg this is your url “https://docs.google.com/document/d/15uYvJYnHoUSSbko8Ud8Zw2Z6xGR2HR-6nUvPf6cWMFc/edit?usp=sharing”
  6. Now in the custom html add this url with iframe
  7. <iframe src=”https://docs.google.com/document/d/15uYvJYnHoUSSbko8Ud8Zw2Z6xGR2HR-6nUvPf6cWMFc/preview?rm=minimal” width=”100%” height=”280″ frameborder=”0″></iframe>

<iframe src=”DOCS_URL/preview?rm=minimal” width=”100%” height=”680″ frameborder=”0″></iframe>


Steps:

  1. Open the Google Form you want to embed.
  2. Click Send, then select the <> Embed option.
  3. Copy the iframe code and paste it into the WordPress HTML block:
  4. <iframe src=”https://docs.google.com/forms/d/e/1FAIpQLSeyi_nKlKfXND0uBIhk2kZE3hZblftTHV2_lqVRPLjw0B1hCQ/viewform?embedded=true” width=”640″ height=”955″ frameborder=”0″ marginheight=”0″ marginwidth=”0″>Loading…</iframe>

Steps:

  1. Upload the PDF to Google Drive.
  2. Right-click the PDF and select Get link (set to “Anyone with the link”).
  3. Open the PDF and copy the file URL.
  4. Use the following iframe code in WordPress:
  5. https://drive.google.com/file/d/12ug-oN6K4Df-X5jkP51AgJnzMGSwSQ7O/view?usp=drive_link
  6. <iframe src=”https://drive.google.com/file/d/12ug-oN6K4Df-X5jkP51AgJnzMGSwSQ7O/preview?rm=minimal” width=”100%” height=”680″ frameborder=”0″></iframe>

https://drive.google.com/file/d/12ug-oN6K4Df-X5jkP51AgJnzMGSwSQ7O/view?usp=drive_link

<iframe src=”PDF_URL/preview?rm=minimal” width=”100%” height=”680″ frameborder=”0″></iframe>


Steps:

  1. Upload the video to Google Drive.
  2. Right-click the video and select Get link.
  3. Change access to “Anyone with the link”.
  4. Open the video in a new tab and copy the embed URL.
  5. Paste it into the WordPress HTML block using:
  6. <iframe src=”VIDEO_URL/preview?rm=minimal” width=”100%” height=”280″ frameborder=”0″></iframe>

  • Optimize file names: Rename files with descriptive keywords before uploading.
  • Use alt text: Add meaningful alt text to images for better SEO.
  • Ensure mobile responsiveness: Adjust iframe widths to 100% for better display.
  • Improve loading speed: Host large files on Google Drive to reduce website load time.
  • Secure files: Use correct sharing settings to control access.

Conclusion

By following these methods, you can efficiently embed Google Drive images, PDFs, Docs, Forms, and videos in WordPress without using a plugin. This approach helps maintain website performance while ensuring easy file management and accessibility.

Leave a Reply

You are currently viewing How do I embed a Google Image, Form, Pdf in WordPress without the plugin?