{"id":5307,"date":"2019-09-13T04:55:56","date_gmt":"2019-09-13T04:55:56","guid":{"rendered":"https:\/\/musilda.cz\/?p=5307"},"modified":"2019-09-13T04:55:56","modified_gmt":"2019-09-13T04:55:56","slug":"automaticky-import-obrazku-po-presunu-webu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/automaticky-import-obrazku-po-presunu-webu\/","title":{"rendered":"Automatick\u00fd import obr\u00e1zk\u016f po p\u0159esunu webu"},"content":{"rendered":"\n

Rozhodli jste se p\u0159esunout v\u00e1\u0161 dlouholet\u00fd blog na WordPress a pr\u00e1ce, kter\u00e1 v\u00e1s \u010dek\u00e1, je na \u0159adu hodin? M\u00e1te stovky \u010dl\u00e1nk\u016f a fotografi\u00ed v nich? Plugin Auto Update Upload Images v\u00e1m usnadn\u00ed pr\u00e1ci.<\/p>\n\n\n\n

V p\u0159\u00edpad\u011b, \u017ee p\u0159esouv\u00e1te obsah z n\u011bjak\u00e9ho jin\u00e9ho syst\u00e9mu do WordPressu, tak jeho ru\u010dn\u00ed p\u0159esun je velmi zdlouhav\u00fd. V\u011bt\u0161ina modern\u00edch redak\u010dn\u00edch syst\u00e9m\u016f umo\u017e\u0148uje vyexportovat obsah v n\u011bjak\u00e9m xml souboru, nebo pro to existuj\u00ed n\u00e1stroje, kter\u00e9 v\u00e1m ten obsah na WordPress p\u0159esunou. <\/p>\n\n\n\n

Probl\u00e9mem je, \u017ee v obsahu v\u00e1m z\u016fstanou url vedouc\u00ed na obr\u00e1zky v p\u016fvodn\u00edm webu. Sice zm\u011bn\u00edte dom\u00e9nu, ale struktura url se zm\u011bn\u00ed. A to bude po vypnut\u00ed p\u016fvodn\u00edho syst\u00e9mu probl\u00e9m. <\/p>\n\n\n\n

Na\u0161t\u011bst\u00ed m\u00e1 WordPress knihovnu plugin\u016f a v n\u00ed se d\u00e1 naj\u00edt \u0159ada u\u017eite\u010dn\u00fdch n\u00e1stroj\u016f.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Plugin Auto Upload Images<\/h2>\n\n\n\n

Tento plugin, kter\u00fd si st\u00e1hnete zde<\/a>, je jednodu\u0161e super. <\/p>\n\n\n\n

Um\u00ed vlastn\u011b jen jednu v\u011bc – projde obsah postu, najde v\u0161echny obr\u00e1zky, vezme jejich url, nahrad\u00ed ji tou aktu\u00e1ln\u00ed a pokud ji\u017e ten obr\u00e1zek ve WordPressu nen\u00ed ulo\u017een\u00fd, tak jej naimportuje do m\u00e9di\u00ed. <\/p>\n\n\n\n

V\u00e1m tak sta\u010d\u00ed otev\u0159\u00edt \u010dl\u00e1nek v administraci a ulo\u017eit jej. Nic v\u00edc d\u011blat nemus\u00edte. V\u0161echny obr\u00e1zky v \u010dl\u00e1nku se automaticky naimportuj\u00ed a jejich url se p\u0159eulo\u017e\u00ed. <\/p>\n\n\n\n

Nastaven\u00ed pluginu<\/h2>\n\n\n\n

Plugin jako takov\u00fd jednodu\u0161e nemus\u00edte nastavovat, proto\u017ee si vezme aktu\u00e1ln\u00ed url z option WordPressu. Tak\u017ee pokud nepot\u0159ebujete nic jin\u00e9ho, m\u016f\u017eete za\u010d\u00edt p\u0159eukl\u00e1dat posty. <\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Nastaven\u00ed najdete v polo\u017ece menu Nastaven\u00ed -> Auto Upload Images. Mo\u017en\u00e1 v\u00e1m to p\u0159ijde jako automatick\u00e9, hledat to v tomto menu, ale u WordPressu to tak v\u017edy b\u00fdt nemus\u00ed a hledat nastaven\u00ed pluginu je n\u011bkdy docela sranda.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Base url<\/strong> – v tomto nastaven\u00ed m\u016f\u017eete zm\u011bnit novou url. V podstat\u011b to nepot\u0159ebujete, proto\u017ee si plugin vezme v\u00fdchoz\u00ed nastaven\u00ed webu.<\/p>\n\n\n\n

Image name<\/strong> – zde m\u016f\u017eete nastavit, jak\u00fd bude m\u00edt nov\u00fd vytvo\u0159en\u00fd soubor n\u00e1zev. Funguje perfektn\u011b, kombinaci jsem nezkou\u0161el.<\/p>\n\n\n\n

Alt name<\/strong> – toto nastaven\u00ed umo\u017en\u00ed ka\u017ed\u00e9mu obr\u00e1zku vygenerovat alt pomoc\u00ed vybran\u00e9ho parametru. <\/p>\n\n\n\n

Image size<\/strong> – m\u016f\u017eete nastavit maxim\u00e1ln\u00ed velikost nov\u00fdch obr\u00e1zk\u016f, aby se v\u00e1m zbyte\u010dn\u011b neplnil disk serveru. <\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Exclude post type<\/strong> – d\u016fle\u017eit\u00e9 nastaven\u00ed, pokud m\u00e1te n\u011bjak\u00fd druh obsahu, u kter\u00e9ho nechcete, aby se v\u00e1m import prov\u00e1d\u011bl.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Posledn\u00ed nastaven\u00ed pluginu je exclude domains<\/strong>, kter\u00e9 v\u00e1m umo\u017en\u00ed definovat url, u kter\u00fdch je import obr\u00e1zk\u016f ne\u017e\u00e1douc\u00ed.<\/p>\n\n\n\n

T\u00edm m\u016f\u017eeme \u010dl\u00e1nek uzav\u0159\u00edt, nastaven\u00ed pluginu je jednoduch\u00e9 a funguje perfektn\u011b. <\/p>\n\n\n\n

Ale j\u00e1 m\u00e1m 400 \u010dl\u00e1nk\u016f<\/h2>\n\n\n\n

U\u017e jen ta p\u0159edstava, jak otev\u00edr\u00e1m a klik\u00e1m 400x na Aktualizovat m\u011b d\u011bs\u00ed. <\/p>\n\n\n\n

Na\u0161t\u011bst\u00ed m\u00e1 plugin metodu, kter\u00e1 se o p\u0159eulo\u017een\u00ed star\u00e1, definovanou jako ve\u0159ejnou a toho m\u016f\u017eeme vyu\u017e\u00edt.<\/p>\n\n\n\n

Na\u010dteme posty pomoc\u00ed query, projdeme je, z\u00edsk\u00e1me upraven\u00fd post_content a ulo\u017e\u00edme. Viz. snippet:<\/p>\n\n\n\n\n\n\n\n

Snippet nen\u00ed ur\u010den\u00fd pro okam\u017eit\u00e9 pou\u017eit\u00ed, je t\u0159eba upravit z\u00edsk\u00e1n\u00ed post\u016f, tak aby vyhovovalo va\u0161im podm\u00ednk\u00e1m. <\/p>\n\n\n\n

Ka\u017ed\u00e9 hr\u00e1tky s hromadnou \u00fapravou sebou nesou riziko v tom, \u017ee kdy\u017e ud\u011bl\u00e1te chybu, chyba se n\u00e1sob\u00ed. Tak\u017ee opatrn\u011b a myslete na to, \u017ee bez z\u00e1lohy to je jako nechr\u00e1n\u011bn\u00fd sex. St\u00e1t se nic nemus\u00ed, ale…<\/p>\n\n\n\n

OnPage SEO<\/h2>\n\n\n\n

P\u0159ed koncem \u010dl\u00e1nku chci je\u0161t\u011b zm\u00ednit jednu v\u011bc, kter\u00e1 mne napadla p\u0159i psan\u00ed. <\/p>\n\n\n\n

Probl\u00e9mem u web\u016f, kter\u00e9 tvo\u0159\u00ed u\u017eivatel\u00e9 sami, b\u00fdvaj\u00ed obr\u00e1zky. Jejich pojmenov\u00e1n\u00ed a alty. Ka\u017ed\u00fd chce dopsat \u010dl\u00e1nek a na obr\u00e1zky prd\u00ed. <\/p>\n\n\n\n

A kdy\u017e takov\u00fd web dostane do ruky SEO konzultant, jedn\u00edm z bod\u016f, kter\u00fd se v jejich reportech objevuje, je dopln\u011bn\u00ed alt\u016f u obr\u00e1zk\u016f v obsahu. <\/p>\n\n\n\n

No a t\u00edmto pluginem to velmi rychle vy\u0159e\u0161\u00edte.<\/p>\n\n\n\n

P\u0159esun webu na WordPress<\/h2>\n\n\n\n

Pokud pot\u0159ebujete p\u0159esunout web z jak\u00e9hokoliv syst\u00e9mu naWordPress, m\u016f\u017eete mne kontaktovat, r\u00e1d v\u00e1m pomohu.<\/p>\n\n\n\n

Hezk\u00fd den.<\/p>\n","protected":false},"excerpt":{"rendered":"

Rozhodli jste se p\u0159esunout v\u00e1\u0161 dlouholet\u00fd blog na WordPress a pr\u00e1ce, kter\u00e1 v\u00e1s \u010dek\u00e1, je na \u0159adu hodin? M\u00e1te stovky \u010dl\u00e1nk\u016f a fotografi\u00ed v nich? Plugin Auto Update Upload Images v\u00e1m usnadn\u00ed pr\u00e1ci. V p\u0159\u00edpad\u011b, \u017ee p\u0159esouv\u00e1te obsah z n\u011bjak\u00e9ho jin\u00e9ho syst\u00e9mu do WordPressu, tak jeho ru\u010dn\u00ed p\u0159esun je velmi zdlouhav\u00fd. V\u011bt\u0161ina modern\u00edch redak\u010dn\u00edch syst\u00e9m\u016f<\/p>\n","protected":false},"author":1,"featured_media":5316,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[31],"tags":[],"class_list":["post-5307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-pluginy"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5307"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=5307"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/5316"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=5307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=5307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}