Easy way to replace images in TYPO3 - typo3

I have a TYPO3 installation where I want to replace roughly around 200 images. The original images have not been optimized for the web well and some have unfitting extensions (like PNG for an image that should clearly be JPG).
Other than going into each individual page and replacing the images, is there an easy and fast way to replace all those images?
It TYPO3 8.7.25

Why don't you use the file list module and just replace the images? FAL (File Abstraction Layer) should handle the file relations in all content elements.

Related

How to put content elements side-by-side int typo3

I have just started my Typo3 journey. I want to put 2 content elements side-by-side (in one row). Can anyone tell how is it possible. Because whenever I place any content element, it is displayed as a block and fill the entire row.
Thank you for your time and consideration :)
You have to use container elements which come with the extension 'container'. Please have a look at https://extensions.typo3.org/extension/container
There is no build in solution for your problem.
But in TYPO3 you are free to build any kind of html structure for your output. This is necessary as you also can do any rendering of content. either with your own CSS and HTML-markup or if you use frameworks like Bootstrap.
You can build a new page layout, or any special content element which contains other content elements.
Changing layouts can (and should) be reflected in backend-layouts. (https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/Backend/BackendLayout.html) (there are a lot of other tutorials)
But you also can build/ use individual defined containing content elements. Her you can get support by different extensions (eg. mask, DCE, gridelements) or define it completely on your own (https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/ContentElements/Index.html)

replace images and rebuild all rendered images

I've a Image (logo.jpg 800x800) uploaded in the Backend of typo3. This image is used in many different articles. I've placed the image in these articles in many different sizes, sometimes 400x400, 200x200, etc..
So typo has rendered the smaller version of the original 800x800 logo.jpg.
Now I've to replace the logo with a newer version. I thought I can use the function "replace file" in the media backend from typo3. So i used this function and replaced the logo. Now the new file logo.jpg is in the backend, but all articles show the old version.
My question is, is there another way to replace a previously used image? Or is there a way to "restart" the rendering process in typo3 for all images. It looks like, the smaller version of the image are still in the cache or something like that. But clearing the cache doesn't help.
It depends on your TYPO3 version.
prior to 6.0 (and without extension 'dam') each file was copied on each
usage. so if you have used an image 40 times this image exists in 40
copies on your server. and any change to the original (modify/delete)
would change nothing to these copies.
from these copies calculated versions are build. so further 40 images
could be stored on your server.
the copies are stored, depending on the field they are used in, beyond
/uploads/...
possible places: /uploads/pics/ /uploads/tx_myext/
the calculated images are stored beyond typo3temp.
to replace one image you need to: remove all calculated versions.
and replace all copies with the changed image.
with 6.0 FAL was introduced and images/files were not copied any longer,
but referenzes are stored. Also calculated images are stored by hash so
a resized image can be reused instead of reclculated,
It's just a problem that FAL is not working completely satisfying and a
lot of work is done to fix this for 6.2. After that a change of an file
may result in changes in every usage.

Repeat Image in fpdf without creating another instance

I know in PDFs one can have an image repeated (appear in the PDF more than once) without having multiple instance of the image (i.e. the image data appears in the file only once).
Is there a way to do this with fPDF? I am generating a PDF containing sheets of cards; each has artwork. The artwork, which can be 300dpi, may appear in the file thousands of times.
FPDF will only embed the image once.
From http://www.fpdf.org/en/doc/image.htm
Remark: if an image is used several times, only one copy is embedded in the file.
fPDF does this always. It checks to see if the filename has been added already and creates a reference to the original rather than re-add the image data.
I had used a report designer where this kind of reference had to be made explicitly and I erroneously expected fPDF would work similarly.

What is the best way to enable content authors to add images with captions in Expression Engine

There's a module to do this in Drupal land, but I've been frustrated with the hacks that've been necessary in Wygwam. What is the best way to go about implementing this in such a way that you don't need to totally override the default image handling in ChannelImages/Wygwam?
Assets is a good suggestion, but I believe Devdemon's channel images might be a better fit for the workflow you're suggesting.
http://www.devdemon.com/channel_images/
Clients can add (and see) a caption and more and it's fully integrated with Wygwam and other editors. Devdemon's support is also excellent.
The Assets module from Pixel & Tonic allows you to double-click on the image (or any other file) and add metadata. You then have access to the metadata in your templates.
Check the screenshot: http://pixelandtonic.com/assets
You can also add metadata using the native File Manager. Click the edit icon from the File Manager and you'll see a few fields. You can use the File Entries tag to access it.
http://expressionengine.com/user_guide/modules/file/file_tag.html
I typically use Matrix with one column for the image, one column for the caption, and if a link is needed another column for the link. This of course works best if the image is in a fixed location within your template.
On possible way to accomplish this that I have used is to run some jQuery that looks for images within a certain area, and if they have alt attributes, rewrite the image tag within a tag with a tag inside.
so:
jQuery(document).ready(function() {
$('#page-content > .wrapper img').each(function(){
if($(this).attr('alt') !== undefined && $(this).attr('alt').length > 0){
if(!$(this).parent().hasClass('content-image')){
$(this).replaceWith("<figure class='content-image "+$(this).attr('class')+"'>"+$($('<div></div>').html($(this).clone().attr('class',''))).html()+"<figcaption>"+$(this).attr('alt')+"</figcaption></figure>");
}
}
});
});
will do just that. It's looking within a #page-content div for img tags with alt attributes. And then rewriting it as
<figure><img src='....' .... /><figcaption>This is the text that was in the alt attribute</figcaption></figure>
Soooo, that kinda works. The only caveat is that you had better not use any double-quotes within your alt text, or it will break thangs. Not the cleanest of solutions, but a solution, nonetheless.

ClientBundle in GWT - texture atlas

When ClientBundle created, images from bundle are represent on page as inline data (for ex. img src="data:image/gif;base64,R0lGODlh.... ) in FF, CH. Images are assigned to background so "background-position" attributes works fine.
As usually, MS IE makes problems. Instead of embedding image, IE creates image map/texture atlas/image cache (not so sure about the name) so "background-position" can't be used. Is there any way to disable creation of the image cache.
Also, is it possible to control data embedding. For long list of for ex. list items generated html is very big as same data is repeated from item to item.
How are you including the images? with #Sprite? Create one #Sprite style with nothing in it but the image. Then create styles for all the rest of the css as separate styles. In the code you can set an element to multiple styles. As for ie, look at using chrome-frame when it is an old version of ie.