Skip to content

Conversation

@lexxai
Copy link
Collaborator

@lexxai lexxai commented Dec 21, 2023

image

function image_thumb(img_url){
  if (img_url && img_url.includes(".cloudinary.com")){
    const search_txt ="/upload/";
    const transformation = "c_fill_pad,g_auto,h_200,w_200"
    const replace_txt ="/upload/"+transformation+"/";
    return img_url.replace(search_txt, replace_txt);
  }
  return img_url;
}

@lexxai lexxai requested a review from SVcheburator December 21, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants