English 中文(简体)
典型语言
原标题:Typoscript IMAGE object: disable height/width attributes

是否有任何办法防止打字/打字片的电解器在生成的图像标签上添加尺寸的属性(脂重和宽度)?

UPDATE (Thanks to cascaval)!

解决办法是利用IMG_RESOURCE而不是IMAGE。 这显然没有什么传闻,但却使你完全控制了生成的形象。

   10 = IMG_RESOURCE
   10.file.import = uploads/tx_templavoila/
   10.file.import.current = 1
   10.file.import.listNum = 0
   10.stdWrap.required = 1
   10.stdWrap.wrap (
      <img src="|" />
   )

注:用于Tmlavoila。

最佳回答

<>No,但可使用http://typo3.org/documentation/document-library/viss/doc_core_tsref/4.5.1/view/1/7/#id2633654” rel=“noreferer” IMG_RESOURCEect, 并总结由此形成的图像途径,以便你获得你希望的超文本标签。 例:

temp.image_test = IMG_RESOURCE
temp.image_test {
  stdWrap.wrap = <img src="|" />
  file = GIFBUILDER
  file {
    format = jpg
    quality = 90
    maxWidth = 9999
    maxHeight = 9999
    XY = [10.w],[10.h]

    10 = IMAGE
    10.file {
      import = uploads/pics/
      import.field = image
      import.listNum = 0
    }

    20 = SCALE
    20 {
      width = 200
    }
  }
}
问题回答

!! 它还与IMAGE合作:

10 = IMAGE
10 {
    file = path/to/image.file
    stdWrap.replacement {
        10 {
            search = # width="[0-9]*?"#i
            replace = 
            useRegExp = 1
        }
        20 {
            search = # height="[0-9]*?"#i
            replace = 
            useRegExp = 1
        }
    }
}




相关问题
TYPO3 extensions and symlinks

Can I create a symlink to the local extension from aonther project folder? I have a common local-server and i need to implement same extension on all local project-installations. I tried to put the ...

TYPO3: Use TCA.php to build Frontend Forms?

I m searching for a solution, to build a frontend form from the TCA.php of my TYPO3 extension. Is there any way, to select TCA.php values, from my extension Class? I want to build a select-element ...

How to automatically reload TYPO3 calendar from external ics

Hi I m using the calendar base extension (cal) for displaying my calendar in a TYPO3 website. I configured an external calendar and it imports all events correctly. How can I automatically reload the ...

Does a svn frontend for git exist

We are planing to migrate our repositories from svn to git. However there are some people using np_subversion which integrates SVN into the TYPO3-Backend. np_subversion calls the svn client to make ...

wurfl2 integration in TYPO3

everytime i try to install the wurfl2 extension in TYPO3 i get the following error message: Fatal error: require_once() [function.require]: Failed opening required (include_path= .:/usr/local/php/...

TYPO3: getTypoLink_URL alternative (generating url aliases)

Is there an alternative way of getting the URL to a page (by id) apart from using cObj->getTypoLink_URL? I m trying to create URL aliases, so a page can have multiple URLs (for example "/about" ...

热门标签