Title: [Plugin: HTML Import 2] Optimizing images code
Last modified: August 20, 2016

---

# [Plugin: HTML Import 2] Optimizing images code

 *  [SocialBlogsite](https://wordpress.org/support/users/socialblogsite/)
 * (@socialblogsite)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-html-import-2-optimizing-images-code/)
 * This plugin is needed when we have more pages to import than we can handle by
   hand, and that’s exactly the scenario in which the layout is more likely to be
   changed. Then, the images need to be resized, and this is the perfect time to
   optimize the code to prepare it for a width change, since you are already iterating
   between the images and generating the code!
 * I’ve tried to find a workflow that would allow me to replace all the thumbnails
   with the right new size, no success, because although there are many plugins 
   for that, none of them “predict” what height the new image will be and update
   the source code to match the name of the photo! All of them resize the image 
   in the code, not modifying the filenames.
 * So, if your plugin (or any other) gets rid of the height in both the filename
   AND the code, anyone could search-replace the posts content to make them 240px
   instead of 300px, width, without worrying about height. Browsers can take care
   of that or another plugin that adds the proper width-height to the img code in
   pages.
 * If you add the resize option right in the options it would be MAGIC!
 * Thanks.
 * [http://wordpress.org/extend/plugins/import-html-pages/](http://wordpress.org/extend/plugins/import-html-pages/)

The topic ‘[Plugin: HTML Import 2] Optimizing images code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/import-html-pages.svg)
 * [HTML Import 2](https://wordpress.org/plugins/import-html-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-html-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-html-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/import-html-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-html-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-html-pages/reviews/)

## Tags

 * [embed](https://wordpress.org/support/topic-tag/embed/)
 * [height](https://wordpress.org/support/topic-tag/height/)
 * [image size](https://wordpress.org/support/topic-tag/image-size/)
 * [regex](https://wordpress.org/support/topic-tag/regex/)
 * [rename](https://wordpress.org/support/topic-tag/rename/)
 * [source-code](https://wordpress.org/support/topic-tag/source-code/)
 * [width](https://wordpress.org/support/topic-tag/width/)

 * 0 replies
 * 1 participant
 * Last reply from: [SocialBlogsite](https://wordpress.org/support/users/socialblogsite/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-html-import-2-optimizing-images-code/)
 * Status: not resolved