• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

img pointer to image not automatically adding width and height

New Here ,
Sep 30, 2022 Sep 30, 2022

Copy link to clipboard

Copied

Dreamweaver 21.3 installed, not sure if this is a new feature or a bug.  If its a new feature, please put the option in preferences for the end user to choose whether they want this new feature or not.  Please stop breaking Dreamweaver every few months.

 

when using the pointing tool to link to an img file, it used to be that the height and width were automatically grabbed by DW to get those dimensions and add the attributes "height" and "width" for the amount of pixels.  Now when I use the pointer tool, i have to take an extra step to click on the "do not enter" icon (circle with half an x going thru it) to get DW to populate that info.  I shouldnt have to do two steps to get this info into my line of code, when for years, one step got it done.  If this is a new feature for whatever reason, put the option for the end user to use Legacy or the newer way to do it in Edit, Preferences!

TOPICS
Code , Interface , Product issue

Views

76

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2022 Oct 01, 2022

Copy link to clipboard

Copied

Nor should it.  How long is a piece of string?  It varies.  It's the same with images.

 

Image height & width is determined by:

  • Native image size,
  • User's viewport width,
  • Parent container in which the image resides.

 

To reduce bandwidth consumption by mobile devices, optimize images in Photoshop and export to 1x, 2x, 3x sizes.  Use the <picture> tag with SRCSET attributes to serve appropriate sized images to various devices.

 

Example:

<picture>
  <source media="(min-width:650px)" srcset="largest_image.jpg">
  <source media="(min-width:465px)" srcset="medium_image.jpg">
  <img src="mobile_image.jpg" alt="default" style="width:auto;">
</picture> 

 

Or if you're not that ambitious yet,  use the following style rule in your CSS code.

 

img {max-width:100%}

Browsers will rescale the image to fit whichever device the user has but not more than the image's native file size.  The only downside to this is that mobile devices consume more bandwidth than they should.

 

Hope that helps.

 

[Moderator moved from BUGS to DISCUSSIONS.]

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2022 Oct 01, 2022

Copy link to clipboard

Copied

LATEST

Recommended reading about CSS Containment.

https://www.smashingmagazine.com/2019/12/browsers-containment-css-contain-property/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines