Changeset 117990 in spip-zone


Ignore:
Timestamp:
Sep 30, 2019, 11:39:51 AM (5 months ago)
Author:
arno@…
Message:

mime_content_type n’est pas actif sur tous les serveurs

Location:
_plugins_/image_responsive
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/image_responsive/image_responsive_fonctions.php

    r117633 r117990  
    9595        $source = extraire_attribut($img, "src");
    9696        $source = preg_replace(",\?[0-9]*$,", "", $source);
     97       
     98       
    9799        if (file_exists($source)) {
    98100                $l = largeur($source);
    99101                $h = hauteur($source);
    100                 $mime = mime_content_type($source);
     102
     103                // mime_content_type ne fonctionn pas sur certaines versions de PHP…
     104                // $mime = mime_content_type($source);
     105                if (preg_match("png$", $source)) $mime = "image/png";
     106                else if (preg_match("gif$", $source)) $mime = "image/gif";
     107                $mime = "image/jpeg";
     108               
    101109                $timestamp = filemtime($source);
    102110
  • _plugins_/image_responsive/paquet.xml

    r117663 r117990  
    22        prefix="image_responsive"
    33        categorie="multimedia"
    4         version="7.7.8"
     4        version="7.7.9"
    55        etat="stable"
    66        logo="prive/themes/spip/images/image_responsive.png"
Note: See TracChangeset for help on using the changeset viewer.