Unable to add video youtube url in product page as also got error The preview image information is unavailable. Check your connection and try again.
I am using magento 2.4.4-p1 version
This error occurred, due to unable to get the remote image of youtube link. so check the youtube link or curl request is not completed as check the curl request have all access privilege .
$image = $this->curl->read();
if (empty($image)) {
throw new LocalizedException(
__('The preview image information is unavailable. Check your connection and try again.')
);
}
If a given message/LocalizedException showing in the admin product edit page area then it fails in the following situations.
remote image
source found empty, not available from a source(Youtube/Vimeo).\Magento\Framework\HTTP\Adapter\Curl::read
1 - Obtain a YouTube API key
Visit the
https://console.cloud.google.com/apis/library?project=magento2-342010
2 - Adding your YouTube API key in Magento 2
On the sidebar of Magento go to Stores > Settings > Configuration
Under ‘Catalog’ select ‘Catalog’
Under the ‘Product Videos’ area,
paste your previously copied YouTube API key into
the required field
Save
3 - Adding a YouTube video to a Magento 2 product page
Now to tell Magento to insert the video on to a Product page…
Visit the product page edit view you wish to add the video to
Go to the ‘Images and Videos’ section
Click ‘Add Video’
Enter the URL of the video you wish to embed
Click the ‘Get Video information’ button to fill in a lot of the details and customise as required
All that is left is to check the frontend of the website to ensure your video has appeared.
Remember to clear your cache under ‘Cache Management’ for good measure if you find the video is not yet visible.
Kind of your current using theme xml layout error.
Possible to check catalog_product_view.xml
from the custom theme and using the reference instead copying all xml content from parent theme.