function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael Clarke 16Michael Clarke 16 

Unable to display external image on vf page

I have photos in Google Photos and have whitelisted and

On the object Plant_Image__c I have a field Photo_URL__c that contains the URL of the photo that is shared in Google Photos.

I am building a vf page to add to a lightning record page for the Plant Image object.

How can I get the image in Google Photos to show on the vf page?
I have tried iFrame with image and image on its own.
<apex:page standardcontroller="Plant_Image__c" showHeader="False">
    <apex:image alt="{!Plant_Image__c.Plant_Name__c}" height="400" url="{!Plant_Image__c.Photo_URL__c}"/><br/>

User-added image
ANUTEJANUTEJ (Salesforce Developers) 
Hi Michael,

Can you try checking the below link that shows an implementation of showing an image from an external source in a visualforce page, please find the code in the link below for quick reference:


public with sharing class ImageController {
 public String imageURL{get;set;}
  public ImageController()
    List< document > documentList=[select name from document where 

Visualforce page:

<apex:page controller="ImageController" showheader="false" sidebar="false">
      <apex:image url="{!imageURL}">

I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be useful for others in the future.

Abhishek BansalAbhishek Bansal
Hi Michael,

Please use the value tag in image tag like this:
<apex:image value="{!Plant_Image__c.Plant_Name__c}" height="400" /><br/>

Let me know if this works for you.

Abhishek Bansal.