{"id":32141,"date":"2023-12-20T07:00:00","date_gmt":"2023-12-20T15:00:00","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=32141"},"modified":"2025-02-08T17:13:54","modified_gmt":"2025-02-09T01:13:54","slug":"twitter-ruined-your-link-previews","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews","title":{"rendered":"Twitter Ruined Your Link Previews: Here&#8217;s How Cloudinary Can Help"},"content":{"rendered":"\n<p>In October 2023, Twitter rolled out a big and controversial update, which changed how links to the content you share are displayed on the timeline. Previously, link previews would come with a large or small image, and most importantly, the image was accompanied by the headline and description of the URL, giving crucial information to readers scrolling the feed. Now, link previews that include large images are stripped of this contextual data, which has been replaced by a tiny label of the top-level domain of the link, overlaid on the bottom left-hand corner of the image.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"699\" data-public-id=\"Web_Assets\/blog\/image5_3228330a6b\/image5_3228330a6b.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_699,c_scale\/f_auto,q_auto\/v1703113494\/Web_Assets\/blog\/image5_3228330a6b\/image5_3228330a6b.png?_i=AA\" alt=\"\" class=\"wp-post-32141 wp-image-32283\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1703113494\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113494\/Web_Assets\/blog\/image5_3228330a6b\/image5_3228330a6b.png?_i=AA 1526w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113494\/Web_Assets\/blog\/image5_3228330a6b\/image5_3228330a6b.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113494\/Web_Assets\/blog\/image5_3228330a6b\/image5_3228330a6b.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113494\/Web_Assets\/blog\/image5_3228330a6b\/image5_3228330a6b.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Today, links with large image previews don\u2019t even look like links \u2014&nbsp;and this is on purpose. Twitter doesn\u2019t want you to click away from the platform anymore. Sneaky. Additionally, this change comes with some big barriers to accessibility.<\/p>\n\n\n\n<p>In <a href=\"https:\/\/twitter.com\/MattEason\/status\/1709859258492231770\" target=\"_blank\" rel=\"noreferrer noopener\">a tweet from October 5, 2023, designer and developer Matt Eason writes<\/a>: \u201cThe X\/Twitter update to remove headlines from link previews has also completely broken their accessibility. The link\/image can&#8217;t be tabbed to with the keyboard, and it&#8217;s been totally hidden from screen readers.\u201d While the tech community on Twitter rushed to find quick fixes and temporary workarounds for this, others proved how this change could further exacerbate the sharing of misinformation, by posting links to articles that showed images of Elon Musk and other questionable public figures, accompanied by false, damaging, and highly NSFW headlines in the body of the tweet.&nbsp;<\/p>\n\n\n\n<p>While, unfortunately, this post can\u2019t help with fixing the accessibility issues around link sharing on Twitter, it will help you add contextual information to your images that accompany your URLs on Twitter using Cloudinary. But first, let\u2019s take a look at what powers those images.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Open Graph Protocol<\/h2>\n\n\n\n<p>Created at Facebook in 2010, <a href=\"https:\/\/opengraphprotocol.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">the Open Graph (OG) protocol<\/a> was designed to transform web links into visually rich content previews that looked like native Facebook content at the time. Today, you can use Open Graph meta tags in the <code>&lt;head&gt;<\/code> of an HTML page to expose information about web pages to social media platforms and other applications that unfurl URL metadata \u2014 such as Twitter. OG meta tags in the source code are identified by an attribute prefixed with <code>og<\/code>. The following code provides an image URL to be displayed when sharing links on platforms that support it:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">property<\/span>=<span class=\"hljs-string\">\"og:image\"<\/span> <span class=\"hljs-attr\">content<\/span>=<span class=\"hljs-string\">\"https:\/\/example.com\/image.png\"<\/span> \/&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Shortly after, <a href=\"https:\/\/developer.twitter.com\/en\/docs\/twitter-for-websites\/cards\/guides\/getting-started\" target=\"_blank\" rel=\"noreferrer noopener\">Twitter rolled out its own custom implementation built on the OG protocol<\/a>, allowing you to configure the appearance of your web pages on Twitter specifically. On Twitter, you can choose to show a small square image by default, which appears next to the headline (page title) and description (meta description) of the page (and was unaffected by this change in October 2023), or a large landscape image, which used to be displayed above the headline and description.<\/p>\n\n\n\n<p>To instruct Twitter to show large full-width OG images when you share a link, as opposed to the default smaller image alongside the title and description, you can use this meta tag:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"twitter:card\"<\/span> <span class=\"hljs-attr\">content<\/span>=<span class=\"hljs-string\">\"summary_large_image\"<\/span> \/&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"556\" data-public-id=\"Web_Assets\/blog\/image3_322840c284\/image3_322840c284.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_556,c_scale\/f_auto,q_auto\/v1703113489\/Web_Assets\/blog\/image3_322840c284\/image3_322840c284.png?_i=AA\" alt=\"\" class=\"wp-post-32141 wp-image-32284\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1703113489\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113489\/Web_Assets\/blog\/image3_322840c284\/image3_322840c284.png?_i=AA 1504w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113489\/Web_Assets\/blog\/image3_322840c284\/image3_322840c284.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113489\/Web_Assets\/blog\/image3_322840c284\/image3_322840c284.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113489\/Web_Assets\/blog\/image3_322840c284\/image3_322840c284.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To fix a lot of this mess, we could all just revert to using the smaller default image in our link previews on Twitter. However, most people prefer to use larger images because they\u2019re easier to notice, and more aligned with the original visual intentions of the Open Graph protocol created by Facebook in 2010. If you\u2019d like to continue using large images for your URLs on Twitter, here\u2019s how Cloudinary can help.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use Cloudinary to Add Text to Open Graph Images for Twitter<\/h2>\n\n\n\n<p>Before image transformation APIs, Open Graph images were created manually \u2014 for each blog post, website page, or anything else people wanted to share \u2014 uploaded to a CDN (or a folder in a repo!), and referenced by URL when they were needed. As you can imagine, this doesn\u2019t scale, especially for businesses that are adding hundreds of new pages to their websites each week (think e-commerce). Now, with Cloudinary, you can generate dynamic Open Graph images on the fly, via programmatically constructed URLs, or your SDK of choice.<\/p>\n\n\n\n<p>The Cloudinary API offers huge flexibility in adding text to images, overlaying images on images, and further image transformations, but the quickest way to solve the problem Twitter created (if only for sighted people), is to use Cloudinary to add a page title to a base image. Here\u2019s an Open Graph image for one of my blog posts, generated programmatically via the Cloudinary API.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"538\" data-public-id=\"Web_Assets\/blog\/image1_32285babb0\/image1_32285babb0.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_538,c_scale\/f_auto,q_auto\/v1703113485\/Web_Assets\/blog\/image1_32285babb0\/image1_32285babb0.png?_i=AA\" alt=\"Salma Alam-Naylor\u2019s open graph image, showing her name logo, the text live streamer, software engineer and developer educator, overlaid on a pink and orange stylized background, with a headshot to the right.\" class=\"wp-post-32141 wp-image-32285\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1703113485\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113485\/Web_Assets\/blog\/image1_32285babb0\/image1_32285babb0.png?_i=AA 1200w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113485\/Web_Assets\/blog\/image1_32285babb0\/image1_32285babb0.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113485\/Web_Assets\/blog\/image1_32285babb0\/image1_32285babb0.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113485\/Web_Assets\/blog\/image1_32285babb0\/image1_32285babb0.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Let\u2019s look at how to overlay text on an image uploaded to Cloudinary, using URL parameters. The following assumes you\u2019ve <a href=\"https:\/\/cloudinary.com\/users\/register_free\" target=\"_blank\" rel=\"noreferrer noopener\">signed up for a free Cloudinary account<\/a>, and you\u2019re familiar with JavaScript.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Upload a Base Image to Cloudinary<\/h3>\n\n\n\n<p>Before writing any code, you\u2019ll need a base image to work with. You might want to mock up what you want the finished product to look like in your image editing software of choice, to know how much space to leave on the design for text. A tactic I\u2019ve used in the past is to find the shortest and longest page titles on my website, and work the design around those parameters (and I\u2019ll also share a little bonus workaround to accommodate a variety of page title lengths).<\/p>\n\n\n\n<p>Log in to Cloudinary, click <strong>Upload<\/strong>, and add your base image to your Cloudinary Media Library.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"862\" data-public-id=\"Web_Assets\/blog\/image2_32286bd83e\/image2_32286bd83e.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_862,c_scale\/f_auto,q_auto\/v1703113479\/Web_Assets\/blog\/image2_32286bd83e\/image2_32286bd83e.png?_i=AA\" alt=\"Cloudinary Media Library with an upload button at the top left\" class=\"wp-post-32141 wp-image-32286\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1703113479\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113479\/Web_Assets\/blog\/image2_32286bd83e\/image2_32286bd83e.png?_i=AA 1072w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113479\/Web_Assets\/blog\/image2_32286bd83e\/image2_32286bd83e.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113479\/Web_Assets\/blog\/image2_32286bd83e\/image2_32286bd83e.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113479\/Web_Assets\/blog\/image2_32286bd83e\/image2_32286bd83e.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Cloudinary will add an auto-generated suffix to your image name. Click the image to open it in the preview pane, and change the file name using the pencil icon, so that it\u2019s easier to use the asset name in the code. Here\u2019s my base image uploaded to Cloudinary, which includes my name, and a stylized image that matches my website branding.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"862\" data-public-id=\"Web_Assets\/blog\/image4_322879af47_32287b369b\/image4_322879af47_32287b369b.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_862,c_scale\/f_auto,q_auto\/v1703113472\/Web_Assets\/blog\/image4_322879af47_32287b369b\/image4_322879af47_32287b369b.png?_i=AA\" alt=\"My base image in Cloudinary, showing download options, and some basic transformation options available within the Cloudinary app. I have changed the image name to og_pink.\" class=\"wp-post-32141 wp-image-32287\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1703113472\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113472\/Web_Assets\/blog\/image4_322879af47_32287b369b\/image4_322879af47_32287b369b.png?_i=AA 1072w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113472\/Web_Assets\/blog\/image4_322879af47_32287b369b\/image4_322879af47_32287b369b.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113472\/Web_Assets\/blog\/image4_322879af47_32287b369b\/image4_322879af47_32287b369b.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1703113472\/Web_Assets\/blog\/image4_322879af47_32287b369b\/image4_322879af47_32287b369b.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now, let\u2019s write some code!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Cloudinary Image URL: Explained<\/h3>\n\n\n\n<p>Here\u2019s the URL to the current Open Graph image for my website homepage, which overlays the text \u201cLive streamer, software engineer and developer educator\u201d onto my base image.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">https:<span class=\"hljs-comment\">\/\/res.cloudinary.com\/whitep4nth3r\/image\/upload\/w_1200,h_630,c_fill,q_auto,f_auto\/w_657,c_fit,g_south_west,co_rgb:ffffff,x_255,y_80,l_text:interblack.ttf_60:Live%20streamer%252C%20software%20engineer%20and%20developer%20educator\/og_pink.png<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It looks overwhelming at first glance, but each part of the URL gives Cloudinary specific instructions on how to transform your image, like so:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">https:<span class=\"hljs-comment\">\/\/res.cloudinary.com\/{cloud_name}\/image\/upload\/{image_transformations}\/{text_parameters}:{title}\/image_name.png<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Let\u2019s take a look at each part of the URL, and how it works to overlay text on a base image.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Base URL and Account Slug<\/h3>\n\n\n\n<p>The base URL comprises the protocol <code>https:\/\/<\/code>, the CDN subdomain <code>res.cloudinary.com<\/code>, your cloud name (which is found and editable in Cloudinary account settings), followed by <code>\/image\/upload\/<\/code>, indicating we\u2019re accessing a resource of type <code>image<\/code> that is an <code>upload<\/code>. Putting that all together, we have:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">https:<span class=\"hljs-comment\">\/\/res.cloudinary.com\/{cloud_name}\/image\/upload\/<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Image Transformations<\/h3>\n\n\n\n<p>The next part of the URL tells Cloudinary what to do with the base image. My parameters, provided as as comma separated string, are as follows:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>w_1200<\/code> tells Cloudinary to resize the width of the image to 1200px.<\/li>\n\n\n\n<li><code>h_630<\/code> tells Cloudinary to resize the height of the image to 630px.<\/li>\n\n\n\n<li><code>c_fill<\/code> sets the crop parameter, denoted by <code>c_<\/code>, to <code>fill<\/code>.<\/li>\n\n\n\n<li><code>q_auto<\/code> sets the quality parameter, denoted by <code>q_<\/code>, to <code>auto<\/code>.<\/li>\n\n\n\n<li><code>f_auto<\/code> sets the requested file format, denoted by <code>f_<\/code>, to <code>auto<\/code>, which automatically generates (if needed) and <a href=\"https:\/\/cloudinary.com\/documentation\/transformation_reference#f_auto\">delivers an asset in the most optimal format for the requesting browser<\/a> in order to minimize the file size.<\/li>\n\n\n\n<li>Indicate the end of the image transformations with a forward slash <code>\/<\/code>.<\/li>\n<\/ol>\n\n\n\n<p>While 1200&#215;630 are the dimensions of my original base image, should I change my base image in the future and upload a different image size, using <code>w_1200<\/code> and <code>h_630<\/code> ensures that the text positioning will stay consistent without any further changes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Text Parameters<\/h3>\n\n\n\n<p>Next are the text parameters, provided as a comma-separated string. Note that these parameters can be in any order, but I\u2019ve detailed them in the order they appear in the URL above.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>w_657<\/code> sets the width of the text container to 657px.<\/li>\n\n\n\n<li><code>c_fit<\/code> tells Cloudinary to fit my text into the specified container and to wrap the text accordingly.<\/li>\n\n\n\n<li><code>g_south_west<\/code> anchors my text container to the bottom left of the image boundary for positioning with X and Y coordinates.<\/li>\n\n\n\n<li><code>co_rgb:ffffff<\/code> sets the text color to the hex code #ffffff (white).<\/li>\n\n\n\n<li><code>x_255<\/code> moves the text container 255px along the X axis.<\/li>\n\n\n\n<li><code>y_80<\/code> moves the text container 80px along the Y axis.<\/li>\n\n\n\n<li><code>l_text:interblack.ttf_60<\/code> adds the text layer, where <code>l_<\/code> denotes \u201clayer,\u201d sets the font to <code>interblack.ttf<\/code>, which I uploaded to my Cloudinary Media Library, and sets the font size to 60.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">The Text as an Encoded String<\/h3>\n\n\n\n<p>Next, we\u2019ll define the text we want to layer on the image, preceded by a colon. Given the text will be applied via the URL in this case, we\u2019ll need to encode the string in code, so that \u201cLive streamer, software engineer and developer education\u201d becomes <code>Live%20streamer%252C%20software%20engineer%20and%20developer%20educator<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Image Name<\/h3>\n\n\n\n<p>The final part of the URL is the name of your image (that you edited to a more memorable name after you uploaded it). Make sure to include the file extension; in my example, it\u2019s <code>og_pink.png<\/code>.<\/p>\n\n\n\n<p>Now let\u2019s look at how to construct this URL in plain JavaScript, without any libraries or SDKs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Generating the Image URL Programmatically in Code<\/h3>\n\n\n\n<p>Here\u2019s how I construct the Cloudinary image URL using JavaScript. The <code>generateCloudinaryImageUrl<\/code> takes a <code>title<\/code> parameter, which is a string. To make the code easier to read, I define two arrays: <code>imageTransformations<\/code> and <code>titleParameters<\/code>, which are joined by a comma.&nbsp;<\/p>\n\n\n\n<p>Above the <code>titleParameters<\/code> you\u2019ll notice the bonus workaround to accommodate different page title lengths I mentioned earlier. Here, I count the number of words in the title using a Regular Expression. My default <code>titleSize<\/code> is 50. However, if I find 10 words or fewer, I set the titleSize to 60 to make it fill more of the image. Your implementation will depend on the font family you use, and the overall design of your Open Graph image, but it\u2019s a good trick to ensure you account for a variety of title lengths in the code. Also note that I have switched out my custom font for a <a href=\"https:\/\/cloudinary.com\/cookbook\/add_a_text_to_an_image#:~:text=You%20can%20use%20any%20one,the%2Dfly%20in%20the%20cloud.\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary-supported Google font<\/a> in the code.<\/p>\n\n\n\n<p>Finally, all parameters are combined with the necessary parts of the Cloudinary image URL described above, joined via a forward slash, and returned from the function.<\/p>\n\n\n\n<p>If you\u2019d like to add extra information such as the author or the page description, it\u2019s as straightforward as adding an extra text layer, and configuring the parameters accordingly.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">generateCloudinaryImageUrl<\/span>(<span class=\"hljs-params\">title<\/span>) <\/span>{\n  <span class=\"hljs-comment\">\/\/ configure image transformations<\/span>\n  <span class=\"hljs-keyword\">const<\/span> imageTransformations = &#91;<span class=\"hljs-string\">`w_1200`<\/span>, <span class=\"hljs-string\">`h_630`<\/span>, <span class=\"hljs-string\">\"c_fill\"<\/span>, <span class=\"hljs-string\">\"q_auto\"<\/span>, <span class=\"hljs-string\">\"f_auto\"<\/span>].join(<span class=\"hljs-string\">\",\"<\/span>);\n\n  <span class=\"hljs-comment\">\/\/ if 10 words or fewer, increase font size<\/span>\n  <span class=\"hljs-keyword\">const<\/span> wordCount = title.match(<span class=\"hljs-regexp\">\/(\\w+)\/g<\/span>).length;\n  <span class=\"hljs-keyword\">const<\/span> titleSize = wordCount &lt; <span class=\"hljs-number\">10<\/span> ? <span class=\"hljs-number\">60<\/span> : <span class=\"hljs-number\">50<\/span>;\n\n  <span class=\"hljs-keyword\">const<\/span> titleParameters = &#91;\n    <span class=\"hljs-string\">`w_657`<\/span>,\n    <span class=\"hljs-string\">\"c_fit\"<\/span>,\n    <span class=\"hljs-string\">\"g_south_west\"<\/span>,\n    <span class=\"hljs-string\">\"co_rgb:ffffff\"<\/span>,\n    <span class=\"hljs-string\">`x_255`<\/span>,\n    <span class=\"hljs-string\">`y_80`<\/span>,\n    <span class=\"hljs-string\">`l_text:Roboto_<span class=\"hljs-subst\">${titleSize}<\/span>:<span class=\"hljs-subst\">${<span class=\"hljs-built_in\">encodeURIComponent<\/span>(title)}<\/span>`<\/span>,\n  ].join(<span class=\"hljs-string\">\",\"<\/span>);\n\n  <span class=\"hljs-comment\">\/\/ combine all URL parts to generate a Cloudinary URL<\/span>\n  <span class=\"hljs-keyword\">return<\/span> &#91;\n    <span class=\"hljs-string\">\"https:\/\/res.cloudinary.com\"<\/span>,\n    <span class=\"hljs-string\">\"whitep4nth3r\"<\/span>,\n    <span class=\"hljs-string\">\"image\"<\/span>,\n    <span class=\"hljs-string\">\"upload\"<\/span>,\n    imageTransformations,\n    titleParameters,\n    <span class=\"hljs-string\">\"og_pink.png\"<\/span>,\n  ].join(<span class=\"hljs-string\">\"\/\"<\/span>);\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>My website is primarily a static site, so my Open Graph image URLs are generated at build time, and added to the relevant meta tags in the head of my static HTML pages. Your implementation may vary, but ensure you add the following meta tag to the head of your website pages:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">property<\/span>=<span class=\"hljs-string\">\"og:image\"<\/span>\n<span class=\"hljs-attr\">content<\/span>=<span class=\"hljs-string\">\"https:\/\/your_dynamically_generated_cloudinary_url\"<\/span> \/&gt;<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>And that\u2019s it!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Streamline Your Workflow With Cloudinary SDKs<\/h2>\n\n\n\n<p>Now that you\u2019re familiar with adding text to images using Cloudinary URL parameters, you may want to level up your productivity by using one of the many <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_sdks\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudinary SDKs<\/a> to achieve the same results in your front-end framework of choice, without needing to write your own bespoke transformation methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Transforming Images With Cloudinary in NuxtJS<\/h3>\n\n\n\n<p>If you\u2019re using Nuxt, Cloudinary provides a handy <a href=\"https:\/\/cloudinary.nuxtjs.org\/components\/cldogimage#cldogimagevue\" target=\"_blank\" rel=\"noreferrer noopener\">Open Graph image component<\/a> that automatically generates and inserts the required Open Graph meta tags to the head of your pages.&nbsp;<\/p>\n\n\n\n<p>Follow the <a href=\"https:\/\/cloudinary.nuxtjs.org\/getting-started\/setup#installation\" target=\"_blank\" rel=\"noreferrer noopener\">installation instructions for a Nuxt project<\/a> to install the dependency and add the module to the nuxt.config.ts file, and use the <code>&lt;CldOgImage&gt;<\/code> component to render Open Graph meta tags containing a transformed URL. Inspect the source code and notice that the generated HTML contains a meta tag for <code>twitter:card<\/code> set to <code>summary_large_image<\/code> to provide large Open Graph images for Twitter.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">CldOgImage<\/span>\n    <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"og_pink.png\"<\/span>\n    <span class=\"hljs-attr\">height<\/span>=<span class=\"hljs-string\">\"630\"<\/span>\n    <span class=\"hljs-attr\">width<\/span>=<span class=\"hljs-string\">\"1200\"<\/span>\n    <span class=\"hljs-attr\">:overlays<\/span>=<span class=\"hljs-string\">\"&#91;\n      {\n        position: {\n          gravity: 'south_west',\n          y: 80,\n          x: 255,\n        },\n        width: 657,\n        crop:  'fit',\n        text: {\n          color: '#ffffff',\n          fontFamily: 'Roboto',\n          fontSize: 60,\n          text: 'Live streamer, software engineer and developer educator',\n        },\n      },\n    ]\"<\/span>\n  \/&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>With this library, you can also use a composable to construct the Cloudinary URL, should you want to use the image URL elsewhere. This gives the same result, so you don\u2019t have to manage your own URL construction<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">lang<\/span>=<span class=\"hljs-string\">\"ts\"<\/span> <span class=\"hljs-attr\">setup<\/span>&gt;<\/span><span class=\"javascript\">\n<span class=\"hljs-keyword\">const<\/span> { url } = useCldImageUrl({\n  <span class=\"hljs-attr\">options<\/span>: {\n    <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">\"\/og_pink.png\"<\/span>,\n    <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">1200<\/span>,\n    <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">630<\/span>,\n    <span class=\"hljs-attr\">overlays<\/span>: &#91;\n      {\n        <span class=\"hljs-attr\">position<\/span>: {\n          <span class=\"hljs-attr\">gravity<\/span>: <span class=\"hljs-string\">\"south_west\"<\/span>,\n          <span class=\"hljs-attr\">x<\/span>: <span class=\"hljs-number\">255<\/span>,\n          <span class=\"hljs-attr\">y<\/span>: <span class=\"hljs-number\">80<\/span>,\n        },\n        <span class=\"hljs-attr\">crop<\/span>: <span class=\"hljs-string\">\"fit\"<\/span>,\n        <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">657<\/span>,\n        <span class=\"hljs-attr\">text<\/span>: {\n          <span class=\"hljs-attr\">color<\/span>: <span class=\"hljs-string\">\"#ffffff\"<\/span>,\n          <span class=\"hljs-attr\">fontFamily<\/span>: <span class=\"hljs-string\">\"Roboto\"<\/span>,\n          <span class=\"hljs-attr\">fontSize<\/span>: <span class=\"hljs-number\">60<\/span>,\n          <span class=\"hljs-attr\">text<\/span>: <span class=\"hljs-string\">\"Live streamer, software engineer and developer educator\"<\/span>,\n        },\n      },\n    ],\n  },\n});\n\n<span class=\"hljs-built_in\">console<\/span>.log(url);\n<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Transforming Images With Cloudinary in Next.js<\/h3>\n\n\n\n<p>If you\u2019re using Next.js, Cloudinary offers the same component functionality as Nuxt.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Follow the <a href=\"https:\/\/next.cloudinary.dev\/installation#installation\" target=\"_blank\" rel=\"noreferrer noopener\">installation instructions for a Next.js project<\/a> to install the dependency and use the <code>&lt;CldOgImage&gt;<\/code> component to render Open Graph meta tags containing a transformed URL in the same way.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">import { CldOgImage } from <span class=\"hljs-string\">'next-cloudinary'<\/span>;\n\n&lt;CldOgImage\n  src=<span class=\"hljs-string\">\"og_pink.png\"<\/span>\n  width=<span class=\"hljs-string\">\"1200\"<\/span>\n  height=<span class=\"hljs-string\">\"630\"<\/span>\n  overlays={&#91;\n    {\n      position: {\n        gravity: <span class=\"hljs-string\">'south_west'<\/span>,\n        y: <span class=\"hljs-number\">80<\/span>,\n        x: <span class=\"hljs-number\">255<\/span>,\n      },\n      width: <span class=\"hljs-number\">657<\/span>,\n      crop: <span class=\"hljs-string\">'fit'<\/span>,\n      text: {\n        color: <span class=\"hljs-string\">'#ffffff'<\/span>,\n        fontFamily: <span class=\"hljs-string\">'Roboto'<\/span>,\n        fontSize: <span class=\"hljs-number\">60<\/span>,\n        text: <span class=\"hljs-string\">'Live streamer, software engineer and developer educator'<\/span>,\n      },\n    },\n  ]}\n\/&gt;;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Image Transformation in Front-End Frameworks and Libraries<\/h3>\n\n\n\n<p>Cloudinary offers many more image transformation libraries, SDKs, and utilities for frameworks such as <a href=\"https:\/\/svelte.cloudinary.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">Svelte<\/a>, <a href=\"https:\/\/cloudinary.com\/documentation\/angular_integration\" target=\"_blank\" rel=\"noreferrer noopener\">Angular<\/a>, and for the most popular JavaScript library on the web \u2014<a href=\"https:\/\/cloudinary.com\/documentation\/jquery_integration\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;jQuery<\/a>. Visit the <a href=\"https:\/\/cloudinary.com\/documentation\/cloudinary_sdks\" target=\"_blank\" rel=\"noreferrer noopener\">official Cloudinary SDK Guide<\/a> to see the full list.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Else Can You Do?<\/h2>\n\n\n\n<p>Generating dynamic Open Graph images for sharing links on social sharing is only touching the surface of what Cloudinary can do with your images and media. Programmable image transformations remove so much of the manual image editing work that\u2019s often required to create responsive and adaptive page designs, such as cropping, rounding corners, overlaying text and images such as company logos, and so much more,&nbsp;so you can focus on writing code and shipping features without waiting for bespoke design assets over and over again. Cloudinary also offers video transformation APIs, allowing you to crop videos, overlay images and videos on videos \u2014&nbsp;all without video editing software. And this blows my mind.<\/p>\n\n\n\n<p>Although we can\u2019t fix Twitter accessibility, we can be more intentional about how we share links. If you do want to continue using large Open Graph images on Twitter, even if you\u2019re overlaying text on your images, I\u2019d recommend providing the page title and a short description in your tweets, to ensure that people using screen readers and assistive technology can access the information, and understand what they\u2019re clicking before they visit the link.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In October 2023, Twitter rolled out a big and controversial update, which changed how links to the content you share are displayed on the timeline. Previously, link previews would come with a large or small image, and most importantly, the image was accompanied by the headline and description of the URL, giving crucial information to [&hellip;]<\/p>\n","protected":false},"author":87,"featured_media":32143,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,165],"class_list":["post-32141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-image-transformation"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Twitter Ruined Your Link Previews: Here&#039;s How Cloudinary Can Help<\/title>\n<meta name=\"description\" content=\"In October 2023, Twitter rolled out a controversial update, changing how content links are displayed. Read how Cloudinary can fix it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Twitter Ruined Your Link Previews: Here&#039;s How Cloudinary Can Help\" \/>\n<meta property=\"og:description\" content=\"In October 2023, Twitter rolled out a controversial update, changing how content links are displayed. Read how Cloudinary can fix it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-20T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-09T01:13:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog-png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"melindapham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\"},\"author\":{\"name\":\"melindapham\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\"},\"headline\":\"Twitter Ruined Your Link Previews: Here&#8217;s How Cloudinary Can Help\",\"datePublished\":\"2023-12-20T15:00:00+00:00\",\"dateModified\":\"2025-02-09T01:13:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\"},\"wordCount\":2239,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA\",\"keywords\":[\"Guest Post\",\"Image Transformation\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2023\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\",\"url\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\",\"name\":\"Twitter Ruined Your Link Previews: Here's How Cloudinary Can Help\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA\",\"datePublished\":\"2023-12-20T15:00:00+00:00\",\"dateModified\":\"2025-02-09T01:13:54+00:00\",\"description\":\"In October 2023, Twitter rolled out a controversial update, changing how content links are displayed. Read how Cloudinary can fix it.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA\",\"width\":2000,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Twitter Ruined Your Link Previews: Here&#8217;s How Cloudinary Can Help\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\",\"name\":\"melindapham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"caption\":\"melindapham\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Twitter Ruined Your Link Previews: Here's How Cloudinary Can Help","description":"In October 2023, Twitter rolled out a controversial update, changing how content links are displayed. Read how Cloudinary can fix it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews","og_locale":"en_US","og_type":"article","og_title":"Twitter Ruined Your Link Previews: Here's How Cloudinary Can Help","og_description":"In October 2023, Twitter rolled out a controversial update, changing how content links are displayed. Read how Cloudinary can fix it.","og_url":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews","og_site_name":"Cloudinary Blog","article_published_time":"2023-12-20T15:00:00+00:00","article_modified_time":"2025-02-09T01:13:54+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog-png?_i=AA","type":"image\/png"}],"author":"melindapham","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews"},"author":{"name":"melindapham","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9"},"headline":"Twitter Ruined Your Link Previews: Here&#8217;s How Cloudinary Can Help","datePublished":"2023-12-20T15:00:00+00:00","dateModified":"2025-02-09T01:13:54+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews"},"wordCount":2239,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA","keywords":["Guest Post","Image Transformation"],"inLanguage":"en-US","copyrightYear":"2023","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews","url":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews","name":"Twitter Ruined Your Link Previews: Here's How Cloudinary Can Help","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA","datePublished":"2023-12-20T15:00:00+00:00","dateModified":"2025-02-09T01:13:54+00:00","description":"In October 2023, Twitter rolled out a controversial update, changing how content links are displayed. Read how Cloudinary can fix it.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA","width":2000,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/twitter-ruined-your-link-previews#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Twitter Ruined Your Link Previews: Here&#8217;s How Cloudinary Can Help"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9","name":"melindapham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","caption":"melindapham"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1701473151\/x_open_graph_images-blog\/x_open_graph_images-blog.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/32141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=32141"}],"version-history":[{"count":9,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/32141\/revisions"}],"predecessor-version":[{"id":36750,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/32141\/revisions\/36750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/32143"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=32141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=32141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=32141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}