跳转到内容

如何动态创建 sEO友好URL

图片URL往往显示成长随机字符列表,这些字符不面向查看者,对搜索引擎没有多大帮助。简明有意义的图像文件名比较适合搜索引擎提取图像信息,从而支持网站SEO排名

用户上传图像文件往往没有描述性名称开发商和网站内容管理者需要维护SEO友好URL短效和有意义的URL云化帮助解决了这个问题,向用户提供两个新特征:根路径URL动态SEO后缀.这些特征对网站应用所有者都有用,并特别推荐内容重网站,如在线杂志和新闻网站

云性图像URL通过CDN传送并使用文件夹名称作为路径前缀其中包括资源和图像类型,例如/图像/加载/raw/上载.云家用户中最常用前缀包括/图像/加载内存 URL云道URL特征/图像/加载URL区域可删除, 仅留图公共ID(文件名)路径根

下图实例 上传云并分配篮球shot公有标识码 :

篮球打长URL

云形图像URL实例使用root路径URL特征

篮球短网

URL生成相同的上传图像

篮球采样图像

使用root路径URL能力时,用户也可以添加参数即时图像变换.上传图像需要裁剪为200x200像素时,只需将宽度和高度参数定为200,并用裁剪模式填充

<\/Image>","codeSnippet":" \n\t \n<\/Image>","status":0,"statusText":"Ok","displayName":"React","packageName":"cloudinary-react","packageStatus":"","packageVersion":"1.x"},{"sdkId":"vue_2","framework":"vue_2","language":"vue","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"Vue.js","packageName":"@cloudinary\/vue","packageStatus":"","packageVersion":"1.x"},{"sdkId":"vue","framework":"vue","language":"vue","rawCodeSnippet":" <\/cld-image>","codeSnippet":" \n\t \n<\/cld-image>","status":0,"statusText":"Ok","displayName":"Vue.js","packageName":"cloudinary-vue","packageStatus":"legacy","packageVersion":"1.x"},{"sdkId":"angular_2","framework":"angular_2","language":"angular","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"Angular","packageName":"@cloudinary\/ng","packageStatus":"","packageVersion":"1.x"},{"sdkId":"angular","framework":"angular","language":"angular","rawCodeSnippet":" <\/cl-transformation> <\/cl-image>","codeSnippet":" \n\t \n\t<\/cl-transformation>\n<\/cl-image>","status":0,"statusText":"Ok","displayName":"Angular","packageName":"@cloudinary\/angular-5.x","packageStatus":"legacy","packageVersion":"1.x"},{"sdkId":"js_2","framework":"js_2","language":"js","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"JS","packageName":"@cloudinary\/url-gen","packageStatus":"","packageVersion":"1.x"},{"sdkId":"js","framework":"js","language":"js","rawCodeSnippet":"cloudinary.imageTag('basketball_shot.jpg', {width: 200, height: 200, crop: \"fill\", useRootPath: true}).toHtml();","codeSnippet":"cloudinary.imageTag('basketball_shot.jpg', {width: 200, height: 200, crop: \"fill\", useRootPath: true}).toHtml();","status":0,"statusText":"Ok","displayName":"JS","packageName":"cloudinary-core","packageStatus":"legacy","packageVersion":"2.x"},{"sdkId":"python","framework":"python","language":"python","rawCodeSnippet":"CloudinaryImage(\"basketball_shot.jpg\").image(width=200, height=200, crop=\"fill\", use_root_path=True)","codeSnippet":"CloudinaryImage(\"basketball_shot.jpg\").image(width=200, height=200, crop=\"fill\", use_root_path=True)","status":0,"statusText":"Ok","displayName":"Python","packageName":"cloudinary","packageStatus":"","packageVersion":"1.x"},{"sdkId":"php_2","framework":"php_2","language":"php","rawCodeSnippet":"(new ImageTag('basketball_shot.jpg'))\n\t->resize(Resize::fill()->width(200)\n->height(200));","codeSnippet":"(new ImageTag('basketball_shot.jpg'))\n\t->resize(Resize::fill()->width(200)\n->height(200));","status":0,"statusText":"Ok","displayName":"PHP","packageName":"cloudinary_php","packageStatus":"","packageVersion":"2.x"},{"sdkId":"php","framework":"php","language":"php","rawCodeSnippet":"cl_image_tag(\"basketball_shot.jpg\", array(\"width\"=>200, \"height\"=>200, \"crop\"=>\"fill\", \"use_root_path\"=>true))","codeSnippet":"cl_image_tag(\"basketball_shot.jpg\", array(\"width\"=>200, \"height\"=>200, \"crop\"=>\"fill\", \"use_root_path\"=>true))","status":0,"statusText":"Ok","displayName":"PHP","packageName":"cloudinary_php","packageStatus":"legacy","packageVersion":"1.x"},{"sdkId":"java","framework":"java","language":"java","rawCodeSnippet":"cloudinary.url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).imageTag(\"basketball_shot.jpg\");","codeSnippet":"cloudinary.url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).imageTag(\"basketball_shot.jpg\");","status":0,"statusText":"Ok","displayName":"Java","packageName":"cloudinary","packageStatus":"","packageVersion":"1.x"},{"sdkId":"ruby","framework":"ruby","language":"ruby","rawCodeSnippet":"cl_image_tag(\"basketball_shot.jpg\", :width=>200, :height=>200, :crop=>\"fill\", :use_root_path=>true)","codeSnippet":"cl_image_tag(\"basketball_shot.jpg\", :width=>200, :height=>200, :crop=>\"fill\", :use_root_path=>true)","status":0,"statusText":"Ok","displayName":"Ruby","packageName":"cloudinary","packageStatus":"","packageVersion":"1.x"},{"sdkId":"csharp","framework":"csharp","language":"csharp","rawCodeSnippet":"cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(200).Height(200).Crop(\"fill\")).UseRootPath(true).BuildImageTag(\"basketball_shot.jpg\")","codeSnippet":"cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(200).Height(200).Crop(\"fill\")).UseRootPath(true).BuildImageTag(\"basketball_shot.jpg\")","status":0,"statusText":"Ok","displayName":".NET","packageName":"CloudinaryDotNet","packageStatus":"","packageVersion":"1.x"},{"sdkId":"dart","framework":"dart","language":"dart","rawCodeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","codeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","status":0,"statusText":"Ok","displayName":"Dart","packageName":"cloudinary_dart","packageStatus":"","packageVersion":"0.x"},{"sdkId":"swift","framework":"swift","language":"swift","rawCodeSnippet":"imageView.cldSetImage(cloudinary.createUrl().setUseRootPath( true).setTransformation(CLDTransformation().setWidth(200).setHeight(200).setCrop(\"fill\")).generate(\"basketball_shot.jpg\")!, cloudinary: cloudinary)","codeSnippet":"imageView.cldSetImage(cloudinary.createUrl().setUseRootPath( true).setTransformation(CLDTransformation().setWidth(200).setHeight(200).setCrop(\"fill\")).generate(\"basketball_shot.jpg\")!, cloudinary: cloudinary)","status":0,"statusText":"Ok","displayName":"iOS","packageName":"cloudinary","packageStatus":"","packageVersion":"3.x"},{"sdkId":"android","framework":"android","language":"android","rawCodeSnippet":"MediaManager.get().url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).generate(\"basketball_shot.jpg\");","codeSnippet":"MediaManager.get().url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).generate(\"basketball_shot.jpg\");","status":0,"statusText":"Ok","displayName":"Android","packageName":"cloudinary-android","packageStatus":"","packageVersion":"1.x"},{"sdkId":"flutter","framework":"flutter","language":"flutter","rawCodeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","codeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","status":0,"statusText":"Ok","displayName":"Flutter","packageName":"cloudinary_flutter","packageStatus":"","packageVersion":"0.x"},{"sdkId":"kotlin","framework":"kotlin","language":"kotlin","rawCodeSnippet":"cloudinary.image {\n\tpublicId(\"basketball_shot.jpg\")\n\t resize(Resize.fill() { width(200)\n height(200) }) \n}.generate()","codeSnippet":"cloudinary.image {\n\tpublicId(\"basketball_shot.jpg\")\n\t resize(Resize.fill() { width(200)\n height(200) }) \n}.generate()","status":0,"statusText":"Ok","displayName":"Kotlin","packageName":"kotlin-url-gen","packageStatus":"","packageVersion":"1.x"},{"sdkId":"jquery","framework":"jquery","language":"jquery","rawCodeSnippet":"$.cloudinary.image(\"basketball_shot.jpg\", {width: 200, height: 200, crop: \"fill\", use_root_path: true})","codeSnippet":"$.cloudinary.image(\"basketball_shot.jpg\", {width: 200, height: 200, crop: \"fill\", use_root_path: true})","status":0,"statusText":"Ok","displayName":"jQuery","packageName":"cloudinary-jquery","packageStatus":"","packageVersion":"2.x"},{"sdkId":"react_native","framework":"react_native","language":"react_native","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"React Native","packageName":"cloudinary-react-native","packageStatus":"","packageVersion":"0.x"}]" parsed-url="{"url":"https:\/\/res.www.aaaalireno.com\/demo\/w_200,h_200,c_fill\/basketball_shot.jpg","cloud_name":"demo","host":"res.www.aaaalireno.com","type":"upload","resource_type":"image","transformation":[{"width":"200","height":"200","crop_mode":"fill"}],"transformation_string":"w_200,h_200,c_fill","url_suffix":"","version":"","secure":true,"public_id":"basketball_shot.jpg","extension":"jpg","format":"jpg","format_code":true,"signature":"","private_cdn":false,"result_asset_type":"image"}" with-url="true" > 加载代码示例 200x200篮球拍缩略图

云端库构建交付URL并添加图像标签时,只需设置新参数使用_root_path, to真实性.

下代码样本用于创建HTML图像标签图像URLroot路径URL特征使用

<\/Image>","codeSnippet":" \n\t \n<\/Image>","status":0,"statusText":"Ok","displayName":"React","packageName":"cloudinary-react","packageStatus":"","packageVersion":"1.x"},{"sdkId":"vue_2","framework":"vue_2","language":"vue","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"Vue.js","packageName":"@cloudinary\/vue","packageStatus":"","packageVersion":"1.x"},{"sdkId":"vue","framework":"vue","language":"vue","rawCodeSnippet":" <\/cld-image>","codeSnippet":" \n\t \n<\/cld-image>","status":0,"statusText":"Ok","displayName":"Vue.js","packageName":"cloudinary-vue","packageStatus":"legacy","packageVersion":"1.x"},{"sdkId":"angular_2","framework":"angular_2","language":"angular","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"Angular","packageName":"@cloudinary\/ng","packageStatus":"","packageVersion":"1.x"},{"sdkId":"angular","framework":"angular","language":"angular","rawCodeSnippet":" <\/cl-transformation> <\/cl-image>","codeSnippet":" \n\t \n\t<\/cl-transformation>\n<\/cl-image>","status":0,"statusText":"Ok","displayName":"Angular","packageName":"@cloudinary\/angular-5.x","packageStatus":"legacy","packageVersion":"1.x"},{"sdkId":"js_2","framework":"js_2","language":"js","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"JS","packageName":"@cloudinary\/url-gen","packageStatus":"","packageVersion":"1.x"},{"sdkId":"js","framework":"js","language":"js","rawCodeSnippet":"cloudinary.imageTag('basketball_shot.jpg', {width: 200, height: 200, crop: \"fill\", useRootPath: true}).toHtml();","codeSnippet":"cloudinary.imageTag('basketball_shot.jpg', {width: 200, height: 200, crop: \"fill\", useRootPath: true}).toHtml();","status":0,"statusText":"Ok","displayName":"JS","packageName":"cloudinary-core","packageStatus":"legacy","packageVersion":"2.x"},{"sdkId":"python","framework":"python","language":"python","rawCodeSnippet":"CloudinaryImage(\"basketball_shot.jpg\").image(width=200, height=200, crop=\"fill\", use_root_path=True)","codeSnippet":"CloudinaryImage(\"basketball_shot.jpg\").image(width=200, height=200, crop=\"fill\", use_root_path=True)","status":0,"statusText":"Ok","displayName":"Python","packageName":"cloudinary","packageStatus":"","packageVersion":"1.x"},{"sdkId":"php_2","framework":"php_2","language":"php","rawCodeSnippet":"(new ImageTag('basketball_shot.jpg'))\n\t->resize(Resize::fill()->width(200)\n->height(200));","codeSnippet":"(new ImageTag('basketball_shot.jpg'))\n\t->resize(Resize::fill()->width(200)\n->height(200));","status":0,"statusText":"Ok","displayName":"PHP","packageName":"cloudinary_php","packageStatus":"","packageVersion":"2.x"},{"sdkId":"php","framework":"php","language":"php","rawCodeSnippet":"cl_image_tag(\"basketball_shot.jpg\", array(\"width\"=>200, \"height\"=>200, \"crop\"=>\"fill\", \"use_root_path\"=>true))","codeSnippet":"cl_image_tag(\"basketball_shot.jpg\", array(\"width\"=>200, \"height\"=>200, \"crop\"=>\"fill\", \"use_root_path\"=>true))","status":0,"statusText":"Ok","displayName":"PHP","packageName":"cloudinary_php","packageStatus":"legacy","packageVersion":"1.x"},{"sdkId":"java","framework":"java","language":"java","rawCodeSnippet":"cloudinary.url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).imageTag(\"basketball_shot.jpg\");","codeSnippet":"cloudinary.url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).imageTag(\"basketball_shot.jpg\");","status":0,"statusText":"Ok","displayName":"Java","packageName":"cloudinary","packageStatus":"","packageVersion":"1.x"},{"sdkId":"ruby","framework":"ruby","language":"ruby","rawCodeSnippet":"cl_image_tag(\"basketball_shot.jpg\", :width=>200, :height=>200, :crop=>\"fill\", :use_root_path=>true)","codeSnippet":"cl_image_tag(\"basketball_shot.jpg\", :width=>200, :height=>200, :crop=>\"fill\", :use_root_path=>true)","status":0,"statusText":"Ok","displayName":"Ruby","packageName":"cloudinary","packageStatus":"","packageVersion":"1.x"},{"sdkId":"csharp","framework":"csharp","language":"csharp","rawCodeSnippet":"cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(200).Height(200).Crop(\"fill\")).UseRootPath(true).BuildImageTag(\"basketball_shot.jpg\")","codeSnippet":"cloudinary.Api.UrlImgUp.Transform(new Transformation().Width(200).Height(200).Crop(\"fill\")).UseRootPath(true).BuildImageTag(\"basketball_shot.jpg\")","status":0,"statusText":"Ok","displayName":".NET","packageName":"CloudinaryDotNet","packageStatus":"","packageVersion":"1.x"},{"sdkId":"dart","framework":"dart","language":"dart","rawCodeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","codeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","status":0,"statusText":"Ok","displayName":"Dart","packageName":"cloudinary_dart","packageStatus":"","packageVersion":"0.x"},{"sdkId":"swift","framework":"swift","language":"swift","rawCodeSnippet":"imageView.cldSetImage(cloudinary.createUrl().setUseRootPath( true).setTransformation(CLDTransformation().setWidth(200).setHeight(200).setCrop(\"fill\")).generate(\"basketball_shot.jpg\")!, cloudinary: cloudinary)","codeSnippet":"imageView.cldSetImage(cloudinary.createUrl().setUseRootPath( true).setTransformation(CLDTransformation().setWidth(200).setHeight(200).setCrop(\"fill\")).generate(\"basketball_shot.jpg\")!, cloudinary: cloudinary)","status":0,"statusText":"Ok","displayName":"iOS","packageName":"cloudinary","packageStatus":"","packageVersion":"3.x"},{"sdkId":"android","framework":"android","language":"android","rawCodeSnippet":"MediaManager.get().url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).generate(\"basketball_shot.jpg\");","codeSnippet":"MediaManager.get().url().transformation(new Transformation().width(200).height(200).crop(\"fill\")).useRootPath(true).generate(\"basketball_shot.jpg\");","status":0,"statusText":"Ok","displayName":"Android","packageName":"cloudinary-android","packageStatus":"","packageVersion":"1.x"},{"sdkId":"flutter","framework":"flutter","language":"flutter","rawCodeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","codeSnippet":"cloudinary.image('basketball_shot.jpg').transformation(Transformation()\n\t.resize(Resize.fill().width(200)\n.height(200)));","status":0,"statusText":"Ok","displayName":"Flutter","packageName":"cloudinary_flutter","packageStatus":"","packageVersion":"0.x"},{"sdkId":"kotlin","framework":"kotlin","language":"kotlin","rawCodeSnippet":"cloudinary.image {\n\tpublicId(\"basketball_shot.jpg\")\n\t resize(Resize.fill() { width(200)\n height(200) }) \n}.generate()","codeSnippet":"cloudinary.image {\n\tpublicId(\"basketball_shot.jpg\")\n\t resize(Resize.fill() { width(200)\n height(200) }) \n}.generate()","status":0,"statusText":"Ok","displayName":"Kotlin","packageName":"kotlin-url-gen","packageStatus":"","packageVersion":"1.x"},{"sdkId":"jquery","framework":"jquery","language":"jquery","rawCodeSnippet":"$.cloudinary.image(\"basketball_shot.jpg\", {width: 200, height: 200, crop: \"fill\", use_root_path: true})","codeSnippet":"$.cloudinary.image(\"basketball_shot.jpg\", {width: 200, height: 200, crop: \"fill\", use_root_path: true})","status":0,"statusText":"Ok","displayName":"jQuery","packageName":"cloudinary-jquery","packageStatus":"","packageVersion":"2.x"},{"sdkId":"react_native","framework":"react_native","language":"react_native","rawCodeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","codeSnippet":"new CloudinaryImage(\"basketball_shot.jpg\").resize(\n fill().width(200).height(200)\n);","status":0,"statusText":"Ok","displayName":"React Native","packageName":"cloudinary-react-native","packageStatus":"","packageVersion":"0.x"}]" parsed-url="{"url":"https:\/\/res.www.aaaalireno.com\/demo\/w_200,h_200,c_fill\/basketball_shot.jpg","cloud_name":"demo","host":"res.www.aaaalireno.com","type":"upload","resource_type":"image","transformation":[{"width":"200","height":"200","crop_mode":"fill"}],"transformation_string":"w_200,h_200,c_fill","url_suffix":"","version":"","secure":true,"public_id":"basketball_shot.jpg","extension":"jpg","format":"jpg","format_code":true,"signature":"","private_cdn":false,"result_asset_type":"image"}" with-url="false" > 加载代码示例

多用户请求云化能力 创建图像URL 更全面和描述性上传到云体的每张图像都配有公共标识号,即它的名称交付URL云化系统已提供能力定义自定义公共标识并带文本串或多文件夹名(分片分页)并上传图像公共身份证可视需描述性

新特征允许你从创建描述性URL中分离上传图像和分配公共ID过程图像使用期间没有给定合适的名称文件上传进程后,您可分配更多URL举个例子,用此特征,你可动态添加多异后缀以创建尽可能多的描述性URL您可能想使用这些 URL支持单图像的不同语言或反射某些页面的具体内容

要添加动态SEO后缀,图像路径前缀必须先从默认值修改/图像/加载改短版/图像.

举一例图像带ID上传ltepu4mm0qzw6lkfxt1m并使用标准路径前缀由下列CDN优化URL交付

图片传送

下方后缀basketball-game-in-college添加文本搜索引擎用索引页面和图像

带动态SEO后缀图像

URL下加法并分西班牙文后缀

图片动态SEO后缀西班牙语

附加图像变换很容易编译出云变URL参数图片转换成二百x二百像素收成并圆角加饱和度

200x200缩略图带动态SEO后缀

能力也适用于私有图像和非图像原始文件上传原始文件资源类型/raw/上载替换为/files和私有图像资源类型/图像/私有替换为/私人图像.使用云型SDK开发各种框架时设置新l后缀参数对任意文本, URLs会自动构建/files/私人图像前缀加后缀

sEO友好URL使用自定义域名代替共享res.www.aaaalireno.com.SEO URL后缀和CNAME特征也可以并用,例如

https://images. /w_200/afe6c8e2ca/basktetball-game.jpg

注意,为使用SEO URL后缀或 NAME特性,您的账号需要安装私有CDN配置,该配置仅支持高级计划或更高级我们邀请你联系我们设置这些高级特征

更新27/02/2017:动态SEO URL后缀功能现在可供所有计划使用,不再需要私有CDN配置

贝斯特平台网址云化目标用这两种功能帮助你轻易创建高级图像变换和发送URL以便更好地优化网站搜索引擎云型用户可同时使用根路径URLs和动态SEO后缀特征构建短描述图像URLroot路径URL能力面向所有账户使用,包括免费级,动态SEO后缀能力可用云情高级计划或更高端私自CDN搭建

万一你还没有云化账号 我们邀请你注册免费账号.

回顶

特征邮箱

Baidu
map