{"id":4372,"date":"2017-10-03T11:24:04","date_gmt":"2017-10-03T11:24:04","guid":{"rendered":"http:\/\/musilda.cz\/?p=4372"},"modified":"2017-10-03T11:24:04","modified_gmt":"2017-10-03T11:24:04","slug":"vite-woocommerce-pracuje-obrazky-eshopu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/vite-woocommerce-pracuje-obrazky-eshopu\/","title":{"rendered":"V\u00edte jak WooCommerce pracuje s obr\u00e1zky v eshopu?"},"content":{"rendered":"\n

Na posledn\u00edm \u0161kolen\u00ed jsem se pokou\u0161el vysv\u011btlit, jak WooCommerce pracuje s obr\u00e1zky a pro\u010d to v\u017edy nedopadne tak jak chcete.<\/p>\n\n\n\n

Proto\u017ee m\u00e9 vysv\u011btlen\u00ed bylo pro n\u011bkter\u00e9 z \u00fa\u010dastn\u00edk\u016f komplikovan\u00e9 a matouc\u00ed, p\u0159ipravil jsem tento \u010dl\u00e1nek, s n\u011bkolika uk\u00e1zkami a vysv\u011btlen\u00edm, r\u016fzn\u00fdch p\u0159\u00edklad\u016f.<\/p>\n\n\n\n

P\u0159esto\u017ee se budeme zab\u00fdvat obr\u00e1zky, jen\u017e pou\u017e\u00edv\u00e1 WooCommerce, mus\u00edme si nejprve popsat, jak funguje vytv\u00e1\u0159en\u00ed obr\u00e1zk\u016f ve WordPressu. <\/span><\/p>\n\n\n\n

WooCommerce toti\u017e pou\u017e\u00edv\u00e1 mechanizmus, defaultn\u011b poskytovan\u00fd pr\u00e1v\u011b WordPressem.<\/span><\/p>\n\n\n\n

Proto\u017ee budeme pou\u017e\u00edvat pojem velikost obr\u00e1zku, je nutno \u0159\u00edci, \u017ee se jedn\u00e1 o velikost v pixelech, tedy \u0161\u00ed\u0159ku a v\u00fd\u0161ku a ne datovou velikost obr\u00e1zku, co\u017e m\u016f\u017ee b\u00fdt t\u0159eba 600 kb.<\/span><\/p>\n\n\n\n

Pust\u00edme se tedy do pr\u00e1ce s obr\u00e1zky.<\/span><\/p>\n\n\n\n

Nez\u00e1le\u017e\u00ed na tom, zda obr\u00e1zek vkl\u00e1d\u00e1te do postu, nebo jej nahr\u00e1v\u00e1te do knihovny m\u00e9di\u00ed. WordPress p\u0159i ka\u017ed\u00e9m nahr\u00e1v\u00e1n\u00ed ulo\u017e\u00ed origin\u00e1l nahr\u00e1van\u00fd do syst\u00e9mu do slo\u017eky wp-content\/uploads\/slozka-aktualniho-mesice a vygeneruje k n\u011bmu takzvan\u00e9 n\u00e1hledy.<\/span><\/p>\n\n\n\n

Jsou \u010dty\u0159i:<\/span><\/p>\n\n\n\n