Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Galant1

Newbie
  
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Galant1

  1. В останньому прикладі забув додати ще дужку. if (!in_array($image_type, array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_WEBP))) { if ($this->request->server['HTTPS']) { return $this->config->get('config_ssl') . 'image/' . $image_old; } else { return $this->config->get('config_url') . 'image/' . $image_old; } }
  2. Это крутая идея. На WordPress уже давно подобное есть. Бросьте исходник, пожалуйста.
  3. Не знаю, чи у всіх працює webp формат. Тому залишу тут інфу. Додаєте webp та image/webp в налаштуваннях сервера. Шукаєте рядок в admin\controller\common\filemanager.php // Get files $files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF,}', GLOB_BRACE); if (!$files) { $files = array(); } } і заміняєте на // Get files $files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,webp,JPG,JPEG,PNG,GIF,WEBP}', GLOB_BRACE); if (!$files) { $files = array(); } } Додаєте webp та image/webp, як вказано на скріншоті 2 Далі потрібно в admin\model\tool\image.php замінити 16-й рядок на if (!in_array($image_type, array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_WEBP))) { if ($this->request->server['HTTPS']) { return HTTPS_CATALOG . 'image/' . $image_old; } else { return HTTP_CATALOG . 'image/' . $image_old; } } Далі \catalog\model\tool\image.php, в 16 рядку замінити на if (!in_array($image_type, array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_WEBP))) { if ($this->request->server['HTTPS']) { return $this->config->get('config_ssl') . 'image/' . $image_old; } else { return $this->config->get('config_url') . 'image/' . $image_old; } Після цього зображення будуть працювати
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.