PrestaShop Diet Program – PrestaShop Modification Tutorial Series

September 18th, 2009 by Ardian Yuli Seytanto Leave a reply »

The need for speed

Despite its technical sophistication and advanced functionality, the PrestaShop e-Commerce Solution is very light (around 6 MB not including translation files), so it’s easy to download, install, and update.

PrestaShop is so lightweight and speedy, even customers with slow connection speeds will enjoy buying from you!

The Need for Speed is the logo of PrestaShop. This web application was designed to be light and fast. But there are some tips to reduce the total size of prestashop folder, PrestaShop Image Diet Program is one of this useful technique.

#1 Overview

PrestaShop generate some images simultaneously when new product image added in product creation. In this image, the xx-xx-thickbox.jpg is the largest one. In this tutorial we delete this thickbox image, and using original image file instead.

The Difference Between Original and Generated Images

The Difference Between Original and Generated Images

#2 Log in to Back Office

Log in your PrestaShop back office and go to menu Preferences > Images

menu access prestashop images diet program

menu access prestashop images diet program

#3 Delete thickbox configuration data

This list is used by prestashop to generating another images while new image attached to a product. This generated images is used as thumbnail, or displayed in front office with same dimension. The benefits is we have constant layout whether

generated image list configuration prestashop images diet program

generated image list configuration prestashop images diet program

#4 Regenerate Thumbnail

On the overview section i have explained if there are some automatically generated images in PrestaShop. Prestashop using configuration in step #3 to generate descendant images. Prestashop will delete automatically generated images before create the new ones. The xx-xx-thickbox.jpg files will be deleted first, because there is no configuration for thickbox images, the new images set doesn’t contain thickbox images anymore.

regenerate thumbnail prestashop images diet program

regenerate thumbnail prestashop images diet program

#5 Result

Before :

total folder size before prestashop diet program

total folder size before prestashop diet program

After :

total folder size after prestashop diet program

total folder size after prestashop diet program

Before:

total product image folder size before prestashop diet program

total product image folder size before prestashop diet program

After:

total product image folder size after prestashop diet program

total product image folder size after prestashop diet program

Before:

The Difference Between Original and Generated Images

The Difference Between Original and Generated Images

After:

thickbox image automatically deleted after prestashop image diet program

thickbox image automatically deleted after prestashop image diet program

This is result from my computer, and i have updated some data in my local installation. The file size and images list may be different with yours. The difference of total size product images in this tutorial isn’t significant. But if your store have a lot of products, this technique can safe your budget.

And the last step in this tutorial is modify files which using thickbox image. You can replace it by xx-xx-large.jpg or using the original xx-xx.jpg files. Edit files ../prestashop/themes/prestashop/product.tpl

<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/>
<a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" title="{$image.legend|htmlspecialchars}">

Remove ‘thickbox’ parameter from getImageLink function, this modification make PrestaShop using original uploaded images displayed when thickbox appear. You can using ‘large’ instead ‘thickbox’ to make thickbox using the xx-xx-large.jpg generated images.

<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image)}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic"/>
<a href="{$link->getImageLink($product->link_rewrite, $imageIds)}" rel="other-views" title="{$image.legend|htmlspecialchars}">

Any suggestion ?

Bookmark and Share

This links go to same article

JQZOOM prestashopspeed up prestashopprestashop thickboxprestashop Regenerate Thumbnailsprestashop regenerate thumbnailprestashop getImageLinkprestashop getCatImageLinkprestashop jqzoomprestashop link_rewriteprestashop speedupprestashop thickbox no imageprestashop theme editor moduleprestashop speed up mysqlprestashop theme layout editor tutorialprestashop remove short description in product listprestashop module tutorialprestashop moduls product listprestashop original thickboxprestashop probleme jqzoomprestashop product image folder

Related posts:

Prestashop Images SEO Tips – Prestashop SEO Tutorial

This post is about How to optimize Prestashop in Search Engine Optimization (SEO) perspective by altering images naming convention. 3) How to name the images It’s been recognised within SEO generally that file names can have an impact on results. This is reflected too within search engine optimisation for images....

How to add new hook in PrestaShop engine – Prestashop Modification Tutorial Series

This is random post under Prestashop Modification Tutorial Series. You have to already familiar with Object Oriented Programming in PHP, Smarty, module programming in PrestaShop, and able to manage MySql database either using web interface like PhpMyAdmin, or using command line in Windows command prompt / shell. In this tutorial...

Always connected with our Prestashop Info. We don't send spam. Email address:

8 comments

  1. Rosyidi says:

    Apakah setelah di delete yg thickbox akan langsung terhapus file thickboxnya?
    Aku soalnya punya pengalaman gini : misalnya yg thumbnail small, itu kan untuk produk di admin. Tapi waktu aku delete gambarnya utamanya, dan aku ganti gambar baru, gambar smallnya tetep aja gambar produk yg lama. Udah aku regenerate thumbnails, tapi tetep aja gambarnya produk lama bukan gambar produk baru. :(

    Ntar kapan2 mungkin mo aku hapus manual unt yg small. Btw, kalo Small di delete juga gpp kan?

    • Ardian Yuli Seytanto says:

      “gambar smallnya tetep aja gambar produk yg lama”
      ehm, delete gambarnya manual atau dari BO ? seharusnya kalau dari BO tidak ada masalah. Kalau kita delete konfigurasi thickbox di preferences, kemudian regenerate thumbnails, maka image thickbox otomatis terhapus.

  2. Jage says:

    lagi pengen coba prestashop
    bagusan mana sama wordpress terus dikasih wp-ecommerce ?

    • Ardian Yuli Seytanto says:

      wp-ecommerce bagus untuk product dengan jumlah sedikit, prestashop bagus untuk toko yg lebih rumit, tergantung kebutuhan anda. lagian wp ecommerce bekerja dengan mereplace suatu tanda di post / page dan diganti dengan kode html yg banyak untuk menampilkan produk. jadi seharusnya lebih cepat prestashop untuk jumlah produk yg banyak

  3. Budi Hartono says:

    emm ini ada kelemahannya gak ya… gini misalnya… waktu kita input nama item, trus input gambarnya. kan dia isi rename dengan nama barang kan… la ternyata belakangan ada yang salah dengan namanya. misalnya ternyata salah ketik mustinya a tapi kita ketik e misalnya. waktu di edit bukannya jadi masalah besar tuch :O
    sorry nich saya nanya langsung ke sini aja… soalnya lewat ym gak di respond :(

    • Ardian Yuli Seytanto says:

      waktu di edit mungkin gambarnya tidak di regenerate ya, belum test sih, tapi bila dibandingkand dengan seo friendly nya, mendingan regenerate thumbnail lagi deh, atau mungkin kode regenerate thumb bisa disertakan saat update product.

      • Gudu Yulo Wititi says:

        Gundundu ? Ok ! Malambaka widundu, vato api lapuh. Kedinkapa, lambadi, sokhi sokhi… :-( Yak yak, odi, aba ;-)

Leave a Reply