Parse all `<img>` tags, during doc-gen, and insert the width and height of the sourceed image, if neither are already specified. Warnings are reported if the `<img>` tag has no `src` attribute or the image cannot be loaded. The work is done in the `addImageDimensions` post-processor, which must be configured with a `basePath` so that it knows where to find the images. Closes #15888
		
			
				
	
	
		
			13 lines
		
	
	
		
			260 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			260 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
 | 
						|
module.exports = function copyContentAssetsProcessor(copyFolder) {
 | 
						|
  return {
 | 
						|
    $runBefore: ['postProcessHtml'],
 | 
						|
    assetMappings: [],
 | 
						|
    $process() {
 | 
						|
      this.assetMappings.forEach(map => {
 | 
						|
        copyFolder(map.from, map.to);
 | 
						|
      });
 | 
						|
    }
 | 
						|
  };
 | 
						|
};
 |