{"id":3761,"date":"2019-05-11T23:28:54","date_gmt":"2019-05-11T21:28:54","guid":{"rendered":"https:\/\/www.fanjoe.be\/?p=3761"},"modified":"2019-05-11T23:29:06","modified_gmt":"2019-05-11T21:29:06","slug":"probleme-avec-wordpress-5-x-les-images-de-differentes-tailles-ne-se-generent-plus","status":"publish","type":"post","link":"https:\/\/www.fanjoe.be\/?p=3761","title":{"rendered":"Probl\u00e8me avec WordPress 5.x : Les images de diff\u00e9rentes tailles ne se g\u00e9n\u00e8rent plus"},"content":{"rendered":"<h1>Introduction<\/h1>\n<p>Depuis la mise \u00e0 jour de WordPress vers la version 5.0 et 5.x ensuite, les images de diff\u00e9rentes tailles ne se g\u00e9n\u00e8rent plus lorsque j&rsquo;upload des images.<\/p>\n<h1>Explication<\/h1>\n<p>Lorsqu&rsquo;on ajoute une image sur WordPress, l&rsquo;image originale et upload\u00e9e et des copies redimensionn\u00e9es sont g\u00e9n\u00e9r\u00e9es.<\/p>\n<p><a href=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3763\" data-permalink=\"https:\/\/www.fanjoe.be\/?attachment_id=3763\" data-orig-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01.jpg\" data-orig-size=\"620,470\" data-comments-opened=\"1\" data-image-title=\"Images-WordPress-01\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01-620x470.jpg\" class=\"alignnone wp-image-3763 size-large\" src=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01-620x470.jpg\" alt=\"\" width=\"620\" height=\"470\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01.jpg 620w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01-175x133.jpg 175w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01-300x227.jpg 300w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-01-460x350.jpg 460w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>L&rsquo;original est conserv\u00e9 et, par d\u00e9faut, 3 copies sont g\u00e9n\u00e9r\u00e9es.<\/p>\n<p>Leurs tailles sont d\u00e9finies dans <em><strong>R\u00e9glages &gt; M\u00e9dias<\/strong><\/em> .<\/p>\n<p><a href=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3764\" data-permalink=\"https:\/\/www.fanjoe.be\/?attachment_id=3764\" data-orig-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02.jpg\" data-orig-size=\"770,588\" data-comments-opened=\"1\" data-image-title=\"Images-WordPress-02\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02-620x473.jpg\" class=\"alignnone size-large wp-image-3764\" src=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02-620x473.jpg\" alt=\"\" width=\"620\" height=\"473\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02-620x473.jpg 620w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02-175x134.jpg 175w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02-300x229.jpg 300w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02-460x350.jpg 460w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-02.jpg 770w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>Leurs tailles sont not\u00e9es : <em><strong>miniature<\/strong><\/em>, <em><strong>moyenne<\/strong><\/em>, <em><strong>grande<\/strong><\/em> et <em><strong>taille originale<\/strong><\/em>.<\/p>\n<p>Si le th\u00e8me que vous utilisez a besoin de formats d&rsquo;images particuliers, il comporte certainement ces lignes de code dans le fichier <code>functions.php<\/code> du th\u00e8me :<\/p>\n<pre>add_image_size('homepage-thumb', 220, 180, true );\n\nset_post_thumbnail_size( 150, 150 );<\/pre>\n<p><a href=\"https:\/\/www.wpbeginner.com\/wp-tutorials\/how-to-prevent-wordpress-from-generating-image-sizes\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.wpbeginner.com\/<\/a><\/p>\n<h1>Description du probl\u00e8me<\/h1>\n<p>Lors de l&rsquo;upload, l&rsquo;image originale est upload\u00e9e, mais aucune autre taille d&rsquo;image n&rsquo;est g\u00e9n\u00e9r\u00e9e :<\/p>\n<div class=\"tiled-gallery type-rectangular tiled-gallery-unresized\" data-original-width=\"980\" data-carousel-extra='{&quot;blog_id&quot;:1,&quot;permalink&quot;:&quot;https:\\\/\\\/www.fanjoe.be\\\/?p=3761&quot;,&quot;likes_blog_id&quot;:71477700}' itemscope itemtype=\"http:\/\/schema.org\/ImageGallery\" > <div class=\"gallery-row\" style=\"width: 980px; height: 267px;\" data-original-width=\"980\" data-original-height=\"267\" > <div class=\"gallery-group images-1\" style=\"width: 489px; height: 267px;\" data-original-width=\"489\" data-original-height=\"267\" > <div class=\"tiled-gallery-item tiled-gallery-item-large\" itemprop=\"associatedMedia\" itemscope itemtype=\"http:\/\/schema.org\/ImageObject\"> <a href=\"https:\/\/i0.wp.com\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03.jpg?ssl=1\" border=\"0\" itemprop=\"url\"> <meta itemprop=\"width\" content=\"485\"> <meta itemprop=\"height\" content=\"263\"> <img decoding=\"async\" class=\"\" data-attachment-id=\"3765\" data-orig-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03.jpg\" data-orig-size=\"620,336\" data-comments-opened=\"1\" data-image-title=\"Images-WordPress-03\" data-image-description=\"\" data-medium-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03-300x163.jpg\" data-large-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03-620x336.jpg\" src=\"https:\/\/i0.wp.com\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03.jpg?w=485&#038;h=263&#038;ssl=1\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03.jpg 620w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03-175x95.jpg 175w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-03-300x163.jpg 300w\" width=\"485\" height=\"263\" loading=\"lazy\" data-original-width=\"485\" data-original-height=\"263\" itemprop=\"http:\/\/schema.org\/image\" title=\"Images-WordPress-03\" alt=\"Images-WordPress-03\" style=\"width: 485px; height: 263px;\" \/> <\/a> <\/div> <\/div> <!-- close group --> <div class=\"gallery-group images-1\" style=\"width: 491px; height: 267px;\" data-original-width=\"491\" data-original-height=\"267\" > <div class=\"tiled-gallery-item tiled-gallery-item-large\" itemprop=\"associatedMedia\" itemscope itemtype=\"http:\/\/schema.org\/ImageObject\"> <a href=\"https:\/\/i0.wp.com\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04.jpg?ssl=1\" border=\"0\" itemprop=\"url\"> <meta itemprop=\"width\" content=\"487\"> <meta itemprop=\"height\" content=\"263\"> <img decoding=\"async\" class=\"\" data-attachment-id=\"3766\" data-orig-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04.jpg\" data-orig-size=\"620,335\" data-comments-opened=\"1\" data-image-title=\"Images-WordPress-04\" data-image-description=\"\" data-medium-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04-300x162.jpg\" data-large-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04-620x335.jpg\" src=\"https:\/\/i0.wp.com\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04.jpg?w=487&#038;h=263&#038;ssl=1\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04.jpg 620w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04-175x95.jpg 175w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-04-300x162.jpg 300w\" width=\"487\" height=\"263\" loading=\"lazy\" data-original-width=\"487\" data-original-height=\"263\" itemprop=\"http:\/\/schema.org\/image\" title=\"Images-WordPress-04\" alt=\"Images-WordPress-04\" style=\"width: 487px; height: 263px;\" \/> <\/a> <\/div> <\/div> <!-- close group --> <\/div> <!-- close row --> <\/div>\n<p>De m\u00eame, lorsque l&rsquo;on veut \u00e9diter une image pour la rogner ou la redimensionner, le bouton \u00ab\u00a0<em><strong>Modifier l&rsquo;image<\/strong><\/em>\u00a0\u00bb n&rsquo;est pas pr\u00e9sent :<\/p>\n<p><a href=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3769\" data-permalink=\"https:\/\/www.fanjoe.be\/?attachment_id=3769\" data-orig-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05.jpg\" data-orig-size=\"620,574\" data-comments-opened=\"1\" data-image-title=\"Images-WordPress-05\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05-620x574.jpg\" class=\"alignnone size-large wp-image-3769\" src=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05-620x574.jpg\" alt=\"\" width=\"620\" height=\"574\" srcset=\"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05.jpg 620w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05-175x162.jpg 175w, https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-05-300x278.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<h1>R\u00e9solution du probl\u00e8me<\/h1>\n<p>Le probl\u00e8me vient de l&rsquo;absence de la librairie GD de PHP.<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/24043991\/image-crop-editor-not-working\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/stackoverflow.com\/<\/a><br \/><a href=\"http:\/\/www.lephpfacile.com\/cours\/22-la-librairie-gd\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.lephpfacile.com\/<\/a><\/p>\n<p>Il suffit de l&rsquo;installer avec ces commandes :<\/p>\n<pre>sudo apt-get update\nsudo apt-get install php5-gd\nsudo service nginx restart<\/pre>\n<p>Et en quelques secondes, tous les probl\u00e8mes devraient \u00eatre r\u00e9gl\u00e9s.<\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction <\/p>\n<p>Depuis la mise \u00e0 jour de WordPress vers la version 5.0 et 5.x ensuite, les images de diff\u00e9rentes tailles&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3762,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_post_was_ever_published":false},"categories":[10,3,173,12],"tags":[339,246,340,70],"class_list":["post-3761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-geek","category-informatique","category-linux","category-raspberrypi","tag-images","tag-php5","tag-tailles","tag-wordpress","end"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.fanjoe.be\/wp-content\/uploads\/2019\/05\/Images-WordPress-00.jpg","_links":{"self":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/posts\/3761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3761"}],"version-history":[{"count":0,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/posts\/3761\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=\/wp\/v2\/media\/3762"}],"wp:attachment":[{"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanjoe.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}